示例#1
0
            private async Task SendLastSeenPrivacyChangeUpdate(Telegram telegramService, int selectedIndex)
            {
                IInputPrivacyKey key = new InputPrivacyKeyStatusTimestamp();

                switch (selectedIndex)
                {
                case 0:
                    await SetPrivacyOptions(telegramService, key, new InputPrivacyValueAllowAll());

                    break;

                case 1:
                    await SetPrivacyOptions(telegramService, key, new InputPrivacyValueAllowContacts());

                    break;

                case 2:
                    await SetPrivacyOptions(telegramService, key, new InputPrivacyValueDisallowAll());

                    break;
                }
            }
示例#2
0
 private async Task SendLastSeenPrivacyChangeUpdate(Telegram telegramService, int selectedIndex)
 {
     IInputPrivacyKey key = new InputPrivacyKeyStatusTimestamp();
     switch (selectedIndex)
     {
         case 0:
             await SetPrivacyOptions(telegramService, key, new InputPrivacyValueAllowAll());
             break;
         case 1:
             await SetPrivacyOptions(telegramService, key, new InputPrivacyValueAllowContacts());
             break;
         case 2:
             await SetPrivacyOptions(telegramService, key, new InputPrivacyValueDisallowAll());
             break;
     }
 }