Skip to content

Commit 53d7fba

Browse files
committed
fix: Tapping an item in list widget should open the tapped note
Marking the pending intent as immutable will prevent the system to fill in the data later. It will then open an empty note as the note id is empty Signed-off-by: nkming2 <nkming2@gmail.com>
1 parent 9b4b396 commit 53d7fba

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎app/src/main/java/it/niedermann/owncloud/notes/widget/notelist/NoteListWidget.kt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import com.owncloud.android.lib.common.utils.Log_OC
1919
import it.niedermann.owncloud.notes.R
2020
import it.niedermann.owncloud.notes.edit.EditNoteActivity
2121
import it.niedermann.owncloud.notes.persistence.NotesRepository
22-
import it.niedermann.owncloud.notes.shared.util.WidgetUtil
2322
import java.util.concurrent.ExecutorService
2423
import java.util.concurrent.Executors
2524
import androidx.core.net.toUri
@@ -97,8 +96,9 @@ class NoteListWidget : AppWidgetProvider() {
9796
setPackage(context.packageName)
9897
}
9998

100-
val pendingIntentFlags =
101-
WidgetUtil.pendingIntentFlagCompat(PendingIntent.FLAG_UPDATE_CURRENT or Intent.FILL_IN_COMPONENT)
99+
val pendingIntentFlags = PendingIntent.FLAG_UPDATE_CURRENT or
100+
PendingIntent.FLAG_MUTABLE or
101+
Intent.FILL_IN_COMPONENT
102102
val editNotePendingIntent =
103103
PendingIntent.getActivity(context, 0, editNoteIntent, pendingIntentFlags)
104104

0 commit comments

Comments
 (0)