forked from External/ergo
implement user preferences system
This commit is contained in:
parent
25974b6881
commit
8fc588375b
16 changed files with 515 additions and 167 deletions
|
|
@ -275,6 +275,19 @@ func (client *Client) SetAccountName(account string) (changed bool) {
|
|||
return
|
||||
}
|
||||
|
||||
func (client *Client) AccountSettings() (result AccountSettings) {
|
||||
client.stateMutex.RLock()
|
||||
result = client.accountSettings
|
||||
client.stateMutex.RUnlock()
|
||||
return
|
||||
}
|
||||
|
||||
func (client *Client) SetAccountSettings(settings AccountSettings) {
|
||||
client.stateMutex.Lock()
|
||||
client.accountSettings = settings
|
||||
client.stateMutex.Unlock()
|
||||
}
|
||||
|
||||
func (client *Client) Languages() (languages []string) {
|
||||
client.stateMutex.RLock()
|
||||
languages = client.languages
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue