1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-14 23:33:34 +00:00

autofill rows on settings page

This commit is contained in:
Kyle Spearrin
2019-05-30 22:45:48 -04:00
parent e3dcf4aed1
commit b356627afd
3 changed files with 49 additions and 8 deletions

View File

@@ -259,6 +259,31 @@ namespace Bit.App.Pages
private void BuildList()
{
var doUpper = Device.RuntimePlatform != Device.Android;
var autofillItems = new List<SettingsPageListItem>();
if(Device.RuntimePlatform == Device.Android)
{
if(_deviceActionService.SupportsAutofillService())
{
autofillItems.Add(new SettingsPageListItem
{
Name = AppResources.AutofillService,
SubLabel = _deviceActionService.AutofillServiceEnabled() ? "✓" : null
});
}
autofillItems.Add(new SettingsPageListItem
{
Name = AppResources.AutofillAccessibilityService,
SubLabel = _deviceActionService.AutofillAccessibilityServiceRunning() ? "✓" : null
});
}
else
{
if(_deviceActionService.SystemMajorVersion() >= 12)
{
autofillItems.Add(new SettingsPageListItem { Name = AppResources.PasswordAutofill });
}
autofillItems.Add(new SettingsPageListItem { Name = AppResources.AppExtension });
}
var manageItems = new List<SettingsPageListItem>
{
new SettingsPageListItem { Name = AppResources.Folders },
@@ -302,6 +327,7 @@ namespace Bit.App.Pages
};
GroupedItems.ResetWithRange(new List<SettingsPageListGroup>
{
new SettingsPageListGroup(autofillItems, AppResources.Autofill, doUpper),
new SettingsPageListGroup(manageItems, AppResources.Manage, doUpper),
new SettingsPageListGroup(securityItems, AppResources.Security, doUpper),
new SettingsPageListGroup(accountItems, AppResources.Account, doUpper),