mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-24 19:06:53 +01:00
Xiaomi: Fix crash when deleting last widget screen
This commit is contained in:
parent
5e6bf798a4
commit
320fccbaae
@ -159,9 +159,9 @@ public class WidgetScreensListActivity extends AbstractGBActivity {
|
||||
public void deleteWidgetScreen(final WidgetScreen widgetScreen) {
|
||||
if (mGBWidgetScreenListAdapter.getItemCount() - 1 < widgetManager.getMinScreens()) {
|
||||
// Under minimum slots
|
||||
new MaterialAlertDialogBuilder(this.getBaseContext())
|
||||
new MaterialAlertDialogBuilder(this)
|
||||
.setTitle(R.string.widget_screen_delete_confirm_title)
|
||||
.setMessage(getBaseContext().getString(R.string.widget_screen_min_screens, String.format(Locale.getDefault(), "%d", widgetManager.getMinScreens())))
|
||||
.setMessage(this.getString(R.string.widget_screen_min_screens, String.format(Locale.getDefault(), "%d", widgetManager.getMinScreens())))
|
||||
.setIcon(R.drawable.ic_warning)
|
||||
.setPositiveButton(android.R.string.ok, (dialog, whichButton) -> {
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user