Compare commits
2 Commits
48e1b02e0e
...
a72fb08dc8
| Author | SHA1 | Date | |
|---|---|---|---|
| a72fb08dc8 | |||
| 944fa89b3c |
14
models/profile.go
Normal file
14
models/profile.go
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
package models
|
||||||
|
|
||||||
|
type Profile struct {
|
||||||
|
ProfileItems []string
|
||||||
|
Max int
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *Profile) InsertOrShift(index int, value string) {
|
||||||
|
if index < len(p.ProfileItems) {
|
||||||
|
p.ProfileItems = append(p.ProfileItems[:index], value)
|
||||||
|
} else {
|
||||||
|
p.ProfileItems = append(p.ProfileItems, value)
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,8 +3,8 @@ LOAD get_current_profile_info 0
|
|||||||
RELOAD get_current_profile_info
|
RELOAD get_current_profile_info
|
||||||
MAP get_current_profile_info
|
MAP get_current_profile_info
|
||||||
MOUT back 0
|
MOUT back 0
|
||||||
LOAD save_familyname 64
|
|
||||||
HALT
|
HALT
|
||||||
|
LOAD save_familyname 64
|
||||||
RELOAD save_familyname
|
RELOAD save_familyname
|
||||||
INCMP _ 0
|
INCMP _ 0
|
||||||
CATCH pin_entry flag_familyname_set 1
|
CATCH pin_entry flag_familyname_set 1
|
||||||
|
|||||||
@ -2,10 +2,10 @@ CATCH update_firstname flag_allow_update 1
|
|||||||
LOAD get_current_profile_info 0
|
LOAD get_current_profile_info 0
|
||||||
RELOAD get_current_profile_info
|
RELOAD get_current_profile_info
|
||||||
MAP get_current_profile_info
|
MAP get_current_profile_info
|
||||||
LOAD save_firstname 128
|
|
||||||
MOUT back 0
|
MOUT back 0
|
||||||
HALT
|
HALT
|
||||||
RELOAD save_firstname
|
|
||||||
INCMP _ 0
|
INCMP _ 0
|
||||||
|
LOAD save_firstname 128
|
||||||
|
RELOAD save_firstname
|
||||||
CATCH pin_entry flag_firstname_set 1
|
CATCH pin_entry flag_firstname_set 1
|
||||||
INCMP edit_family_name *
|
INCMP edit_family_name *
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user