Show clipboard url tip in Snackbar
This commit is contained in:
1 parent
934ec87390
commit
e8de8ac5c8
9 files changed
+12
-25
No files matched your search
@@ -517,15 +517,10 @@ public final class MainActivity extends StageActivity
|
||||
|
||||
if (text != null && hashCode != 0 && Settings.getClipboardTextHashCode() != hashCode) {
|
||||
Announcer announcer = createAnnouncerFromClipboardUrl(text);
|
||||
if (announcer != null) {
|
||||
new AlertDialog.Builder(this)
|
||||
.setTitle(R.string.clipboard_gallery_url_dialog_title)
|
||||
.setMessage(R.string.clipboard_gallery_url_dialog_message)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setPositiveButton(android.R.string.ok, (dialog, which) -> {
|
||||
startScene(announcer);
|
||||
})
|
||||
.show();
|
||||
if (announcer != null && mDrawerLayout != null) {
|
||||
Snackbar snackbar = Snackbar.make(mDrawerLayout, R.string.clipboard_gallery_url_snack_message, Snackbar.LENGTH_INDEFINITE);
|
||||
snackbar.setAction(R.string.clipboard_gallery_url_snack_action, v -> startScene(announcer));
|
||||
snackbar.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user