mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-10 20:57:25 +01:00
Use discard instead of yes in several dialogs.
This commit is contained in:
parent
9870c592eb
commit
6b874cc25d
@ -265,7 +265,7 @@ public class EditCommentActivity extends BaseActivity implements UploadImageEnab
|
||||
new MaterialAlertDialogBuilder(this, R.style.MaterialAlertDialogTheme)
|
||||
.setTitle(titleResId)
|
||||
.setMessage(messageResId)
|
||||
.setPositiveButton(R.string.yes, (dialogInterface, i)
|
||||
.setPositiveButton(R.string.discard_dialog_button, (dialogInterface, i)
|
||||
-> finish())
|
||||
.setNegativeButton(R.string.no, null)
|
||||
.show();
|
||||
|
@ -293,7 +293,7 @@ public class EditPostActivity extends BaseActivity implements UploadImageEnabled
|
||||
new MaterialAlertDialogBuilder(this, R.style.MaterialAlertDialogTheme)
|
||||
.setTitle(titleResId)
|
||||
.setMessage(messageResId)
|
||||
.setPositiveButton(R.string.yes, (dialogInterface, i)
|
||||
.setPositiveButton(R.string.discard_dialog_button, (dialogInterface, i)
|
||||
-> finish())
|
||||
.setNegativeButton(R.string.no, null)
|
||||
.show();
|
||||
|
@ -361,11 +361,11 @@ public class FilteredPostsActivity extends BaseActivity implements SortTypeSelec
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
int itemId = item.getItemId();
|
||||
if (itemId == android.R.id.home) {
|
||||
finish();
|
||||
return true;
|
||||
case R.id.action_sort_filtered_thing_activity:
|
||||
} else if (itemId == R.id.action_sort_filtered_thing_activity) {
|
||||
switch (postType) {
|
||||
case PostDataSource.TYPE_FRONT_PAGE:
|
||||
SortTypeBottomSheetFragment bestSortTypeBottomSheetFragment = new SortTypeBottomSheetFragment();
|
||||
@ -407,15 +407,15 @@ public class FilteredPostsActivity extends BaseActivity implements SortTypeSelec
|
||||
userThingSortTypeBottomSheetFragment.show(getSupportFragmentManager(), userThingSortTypeBottomSheetFragment.getTag());
|
||||
}
|
||||
return true;
|
||||
case R.id.action_refresh_filtered_thing_activity:
|
||||
} else if (itemId == R.id.action_refresh_filtered_thing_activity) {
|
||||
if (mMenu != null) {
|
||||
mMenu.findItem(R.id.action_lazy_mode_filtered_thing_activity).setTitle(R.string.action_start_lazy_mode);
|
||||
}
|
||||
if (mFragment instanceof FragmentCommunicator) {
|
||||
if (mFragment != null) {
|
||||
((FragmentCommunicator) mFragment).refresh();
|
||||
}
|
||||
return true;
|
||||
case R.id.action_lazy_mode_filtered_thing_activity:
|
||||
} else if (itemId == R.id.action_lazy_mode_filtered_thing_activity) {
|
||||
MenuItem lazyModeItem = mMenu.findItem(R.id.action_lazy_mode_filtered_thing_activity);
|
||||
if (isInLazyMode) {
|
||||
((FragmentCommunicator) mFragment).stopLazyMode();
|
||||
@ -432,7 +432,7 @@ public class FilteredPostsActivity extends BaseActivity implements SortTypeSelec
|
||||
}
|
||||
}
|
||||
return true;
|
||||
case R.id.action_change_post_layout_filtered_post_activity:
|
||||
} else if (itemId == R.id.action_change_post_layout_filtered_post_activity) {
|
||||
PostLayoutBottomSheetFragment postLayoutBottomSheetFragment = new PostLayoutBottomSheetFragment();
|
||||
postLayoutBottomSheetFragment.show(getSupportFragmentManager(), postLayoutBottomSheetFragment.getTag());
|
||||
return true;
|
||||
|
@ -509,7 +509,7 @@ public class PostGalleryActivity extends BaseActivity implements FlairBottomShee
|
||||
new MaterialAlertDialogBuilder(this, R.style.MaterialAlertDialogTheme)
|
||||
.setTitle(titleResId)
|
||||
.setMessage(messageResId)
|
||||
.setPositiveButton(R.string.yes, (dialogInterface, i)
|
||||
.setPositiveButton(R.string.discard_dialog_button, (dialogInterface, i)
|
||||
-> finish())
|
||||
.setNegativeButton(R.string.no, null)
|
||||
.show();
|
||||
|
@ -449,7 +449,7 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF
|
||||
new MaterialAlertDialogBuilder(this, R.style.MaterialAlertDialogTheme)
|
||||
.setTitle(titleResId)
|
||||
.setMessage(messageResId)
|
||||
.setPositiveButton(R.string.yes, (dialogInterface, i)
|
||||
.setPositiveButton(R.string.discard_dialog_button, (dialogInterface, i)
|
||||
-> finish())
|
||||
.setNegativeButton(R.string.no, null)
|
||||
.show();
|
||||
|
@ -418,7 +418,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr
|
||||
new MaterialAlertDialogBuilder(this, R.style.MaterialAlertDialogTheme)
|
||||
.setTitle(titleResId)
|
||||
.setMessage(messageResId)
|
||||
.setPositiveButton(R.string.yes, (dialogInterface, i) -> finish())
|
||||
.setPositiveButton(R.string.discard_dialog_button, (dialogInterface, i) -> finish())
|
||||
.setNegativeButton(R.string.no, null)
|
||||
.show();
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr
|
||||
new MaterialAlertDialogBuilder(this, R.style.MaterialAlertDialogTheme)
|
||||
.setTitle(titleResId)
|
||||
.setMessage(messageResId)
|
||||
.setPositiveButton(R.string.discard, (dialogInterface, i)
|
||||
.setPositiveButton(R.string.discard_dialog_button, (dialogInterface, i)
|
||||
-> finish())
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
.show();
|
||||
|
@ -459,7 +459,7 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF
|
||||
new MaterialAlertDialogBuilder(this, R.style.MaterialAlertDialogTheme)
|
||||
.setTitle(titleResId)
|
||||
.setMessage(messageResId)
|
||||
.setPositiveButton(R.string.yes, (dialogInterface, i) -> finish())
|
||||
.setPositiveButton(R.string.discard_dialog_button, (dialogInterface, i) -> finish())
|
||||
.setNegativeButton(R.string.no, null)
|
||||
.show();
|
||||
}
|
||||
|
@ -607,6 +607,7 @@
|
||||
<string name="discard_detail">All the draft will NOT be saved.</string>
|
||||
<string name="yes">Yes</string>
|
||||
<string name="no">No</string>
|
||||
<string name="discard_dialog_button">Discard</string>
|
||||
|
||||
<string name="no_data_received">No data received</string>
|
||||
<string name="no_image_path_received">No image path received</string>
|
||||
|
Loading…
Reference in New Issue
Block a user