Notification filtering fixes (#1232)

* fix popup menu not shown on Android 5

* use correct no button for notification clearing confirmation dialog
This commit is contained in:
Konrad Pozniak 2019-05-03 20:41:55 +02:00 committed by GitHub
parent 0ee5dd866d
commit 28a76c1a5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -255,14 +255,11 @@ public class NotificationsFragment extends SFragment implements
}
private void confirmClearNotifications(){
AlertDialog.Builder dialog = new AlertDialog.Builder(getContext());
dialog.setMessage(R.string.notification_clear_text);
dialog.setPositiveButton(android.R.string.yes, (DialogInterface dia, int which) -> clearNotifications());
dialog.setNeutralButton(android.R.string.no, null);
dialog.show();
new AlertDialog.Builder(getContext())
.setMessage(R.string.notification_clear_text)
.setPositiveButton(android.R.string.yes, (DialogInterface dia, int which) -> clearNotifications())
.setNegativeButton(android.R.string.no, null)
.show();
}
private void handleFavEvent(FavoriteEvent event) {
@ -646,6 +643,8 @@ public class NotificationsFragment extends SFragment implements
}
window.setContentView(view);
window.setFocusable(true);
window.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT);
window.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
window.showAsDropDown(buttonFilter);
}