fix unifiedpush settings item

closes sk22#770
This commit is contained in:
sk 2023-08-27 14:33:57 +02:00
parent ef3f96ba74
commit 2fafdcc4f8
2 changed files with 5 additions and 4 deletions

View File

@ -98,6 +98,7 @@ public class SettingsNotificationsFragment extends BaseSettingsFragment<Void>{
typeItems=List.of(mentionsItem, boostsItem, favoritesItem, followersItem, pollsItem, updateItem, postsItem);
pauseItem.checkedChangeListener=checked->onPauseNotificationsClick(true);
unifiedPushItem.checkedChangeListener=checked->onUnifiedPush();
updatePolicyItem(null);
updatePauseItem();
}
@ -347,7 +348,7 @@ public class SettingsNotificationsFragment extends BaseSettingsFragment<Void>{
private void showUnifiedPushRegisterDialog(List<String> distributors){
new M3AlertDialogBuilder(getContext()).setTitle(R.string.sk_settings_unifiedpush_choose).setItems(distributors.toArray(String[]::new),
(dialog, which) ->{
(dialog, which)->{
String userDistrib = distributors.get(which);
UnifiedPush.saveDistributor(getContext(), userDistrib);
UnifiedPush.registerApp(
@ -358,6 +359,6 @@ public class SettingsNotificationsFragment extends BaseSettingsFragment<Void>{
);
unifiedPushItem.toggle();
rebindItem(unifiedPushItem);
}).show();
}).setOnCancelListener(d->rebindItem(unifiedPushItem)).show();
}
}

View File

@ -5,8 +5,8 @@
android:viewportHeight="24">
<path
android:pathData="M12,1.996C16.05,1.996 19.357,5.191 19.496,9.245L19.5,9.496V13.593L20.88,16.749C20.949,16.907 20.985,17.077 20.985,17.25C20.985,17.94 20.425,18.5 19.735,18.5L15,18.501C15,20.158 13.657,21.501 12,21.501C10.402,21.501 9.096,20.252 9.005,18.678L9,18.499L4.275,18.5C4.104,18.5 3.934,18.465 3.777,18.396C3.144,18.121 2.853,17.385 3.128,16.752L4.5,13.594V9.496C4.501,5.341 7.852,1.996 12,1.996ZM13.5,18.499L10.5,18.501C10.5,19.33 11.172,20.001 12,20.001C12.78,20.001 13.421,19.406 13.493,18.646L13.5,18.499ZM12,3.496C8.68,3.496 6.001,6.17 6,9.496V13.906L4.656,17H19.353L18,13.907L18,9.509L17.997,9.284C17.885,6.05 15.242,3.496 12,3.496Z"
android:fillColor="#212121"/>
android:fillColor="@color/fluent_default_icon_tint"/>
<path
android:pathData="M8.083,9.969A0.508,0.508 0,0 0,8.807 10.682L11.494,7.955L11.494,14.897a0.508,0.508 0,1 0,1.016 0L12.509,7.958L15.193,10.682A0.508,0.508 45,0 0,15.917 9.969L12.452,6.453a0.635,0.635 0,0 0,-0.904 0z"
android:fillColor="#212121"/>
android:fillColor="@color/fluent_default_icon_tint"/>
</vector>