From a612b02dfa6cbda8e1af7821d279870b0da30324 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Sun, 1 Oct 2023 19:17:05 -0700 Subject: [PATCH] Refactor --- app/src/main/java/gallery/memories/service/TimelineQuery.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/gallery/memories/service/TimelineQuery.kt b/app/src/main/java/gallery/memories/service/TimelineQuery.kt index 468ea3ed..31025a1b 100644 --- a/app/src/main/java/gallery/memories/service/TimelineQuery.kt +++ b/app/src/main/java/gallery/memories/service/TimelineQuery.kt @@ -63,12 +63,10 @@ import java.util.concurrent.CountDownLatch } fun destroy() { - if (imageObserver != null) { + if (imageObserver != null) mCtx.contentResolver.unregisterContentObserver(imageObserver!!) - } - if (videoObserver != null) { + if (videoObserver != null) mCtx.contentResolver.unregisterContentObserver(videoObserver!!) - } } fun registerHooks() {