Esempio n. 1
0
        public void onSaveSettings(string nick)
        {
            if (selectedLanguage != null)
            {
                Application.Current.Properties["language"] = selectedLanguage;
            }
            else
            {
                resetLanguage();
            }

            Application.Current.Properties["lockenabled"] = lockEnabled;
            Application.Current.SavePropertiesAsync(); // Force-save properties for compatibility with WPF

            if (Node.localStorage.nickname != nick)
            {
                Node.localStorage.nickname = nick;
                FriendList.broadcastNicknameChange();
            }
            Node.localStorage.writeAccountFile();
            Node.changedSettings = true;
            applyAvatar();

            if (ThemeManager.changeAppearance(selectedAppearance))
            {
                UIHelpers.reloadAllPages();
                if (Device.RuntimePlatform == Device.iOS)
                {
                    return; // iOS automatically pops the current page when reloading contents
                }
            }

            // Pop the current page from the stack
            Navigation.PopAsync(Config.defaultXamarinAnimations);
        }
Esempio n. 2
0
        public void onSaveSettings(string nick)
        {
            if (Node.localStorage.nickname != nick)
            {
                Node.localStorage.nickname = nick;
                FriendList.broadcastNicknameChange();
            }
            Node.localStorage.writeAccountFile();
            Node.changedSettings = true;
            applyAvatar();

            Navigation.PopAsync(Config.defaultXamarinAnimations);
        }
Esempio n. 3
0
        public void onSaveSettings(string nick)
        {
            if (selectedLanguage != null)
            {
                Application.Current.Properties["language"] = selectedLanguage;
                Application.Current.SavePropertiesAsync();  // Force-save properties for compatibility with WPF
            }
            else
            {
                resetLanguage();
            }

            if (Node.localStorage.nickname != nick)
            {
                Node.localStorage.nickname = nick;
                FriendList.broadcastNicknameChange();
            }
            Node.localStorage.writeAccountFile();
            Node.changedSettings = true;
            applyAvatar();

            Navigation.PopAsync(Config.defaultXamarinAnimations);
        }