Skip to content
This repository was archived by the owner on Jun 8, 2024. It is now read-only.

Commit 82fc1de

Browse files
committed
SearchActivity: Fix crash when clipboard is empty
Signed-off-by: Fung <fython@163.com>
1 parent 037f81c commit 82fc1de

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
org.gradle.jvmargs=-Xmx1536m
22
BUILD_TOOLS_VERSION=26.0.1
3-
VERSION_NAME=3.0.0
3+
VERSION_NAME=3.0.1
44
TARGET_SDK_VERSION=26
5-
VERSION_CODE=46
5+
VERSION_CODE=47
66
MIN_SDK_VERSION=21

mobile/src/main/kotlin/info/papdt/express/helper/ui/SearchActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class SearchActivity : AbsActivity(), AddDialogFragment.IAddDialogObserver {
8585
circularRevealActivity()
8686
if (intent[EXTRA_IS_LONGCLICK]!!.asBoolean()
8787
&& clipboardManager
88-
.primaryClipDescription.hasMimeType(ClipDescription.MIMETYPE_TEXT_PLAIN)) {
88+
?.primaryClipDescription?.hasMimeType(ClipDescription.MIMETYPE_TEXT_PLAIN) == true) {
8989
Snackbar.make(rootLayout, R.string.toast_clipboard_paste, Snackbar.LENGTH_LONG)
9090
.setAction(R.string.toast_clipboard_paste_action) {
9191
mSearchEdit.onTextContextMenuItem(android.R.id.paste)

0 commit comments

Comments
 (0)