diff --git a/app/build.gradle b/app/build.gradle
index ace3175f4b44..c869e68993df 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -27,7 +27,7 @@ android {
 
     productFlavors {
         full {
-            versionCode 131
+            versionCode 132
             versionName "5.8.3"
         }
         stub {
diff --git a/app/src/full/java/com/topjohnwu/magisk/ReposFragment.java b/app/src/full/java/com/topjohnwu/magisk/ReposFragment.java
index 0be2d88f3a5f..56fe45ec2c2b 100644
--- a/app/src/full/java/com/topjohnwu/magisk/ReposFragment.java
+++ b/app/src/full/java/com/topjohnwu/magisk/ReposFragment.java
@@ -34,7 +34,7 @@ public class ReposFragment extends BaseFragment implements Topic.Subscriber {
     @BindView(R.id.empty_rv) TextView emptyRv;
     @BindView(R.id.swipeRefreshLayout) SwipeRefreshLayout mSwipeRefreshLayout;
 
-    public static ReposAdapter adapter;
+    private ReposAdapter adapter;
 
     @Override
     public void onCreate(@Nullable Bundle savedInstanceState) {
@@ -62,12 +62,6 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
         return view;
     }
 
-    @Override
-    public void onPause() {
-        super.onPause();
-        adapter = null;
-    }
-
     @Override
     public int[] getSubscribedTopics() {
         return new int[] {Topic.MODULE_LOAD_DONE, Topic.REPO_LOAD_DONE};
@@ -77,12 +71,12 @@ public int[] getSubscribedTopics() {
     public void onPublish(int topic, Object[] result) {
         if (topic == Topic.MODULE_LOAD_DONE) {
             adapter = new ReposAdapter(mm.repoDB, (Map<String, Module>) result[0]);
+            mm.repoDB.registerAdapter(adapter);
             recyclerView.setAdapter(adapter);
             recyclerView.setVisibility(View.VISIBLE);
             emptyRv.setVisibility(View.GONE);
         }
         if (Topic.isPublished(getSubscribedTopics())) {
-            adapter.notifyDBChanged();
             mSwipeRefreshLayout.setRefreshing(false);
             recyclerView.setVisibility(adapter.getItemCount() == 0 ? View.GONE : View.VISIBLE);
             emptyRv.setVisibility(adapter.getItemCount() == 0 ? View.VISIBLE : View.GONE);
@@ -125,6 +119,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
     @Override
     public void onDestroyView() {
         super.onDestroyView();
+        mm.repoDB.unregisterAdapter();
         unbinder.unbind();
     }
 }
diff --git a/app/src/full/java/com/topjohnwu/magisk/asyncs/UpdateRepos.java b/app/src/full/java/com/topjohnwu/magisk/asyncs/UpdateRepos.java
index 49c6796dc78c..ae381ae9d149 100644
--- a/app/src/full/java/com/topjohnwu/magisk/asyncs/UpdateRepos.java
+++ b/app/src/full/java/com/topjohnwu/magisk/asyncs/UpdateRepos.java
@@ -6,7 +6,6 @@
 import com.topjohnwu.magisk.Const;
 import com.topjohnwu.magisk.Data;
 import com.topjohnwu.magisk.MagiskManager;
-import com.topjohnwu.magisk.ReposFragment;
 import com.topjohnwu.magisk.container.Repo;
 import com.topjohnwu.magisk.utils.Logger;
 import com.topjohnwu.magisk.utils.Topic;
@@ -80,10 +79,6 @@ private boolean loadJSON(String jsonString) throws JSONException, ParseException
                         set.remove(id);
                     repo.update(date);
                     mm.repoDB.addRepo(repo);
-                    Data.mainHandler.post(() -> {
-                        if (ReposFragment.adapter != null)
-                            ReposFragment.adapter.notifyDBChanged();
-                    });
                 } catch (Repo.IllegalRepoException e) {
                     Logger.debug(e.getMessage());
                     mm.repoDB.removeRepo(id);
diff --git a/app/src/full/java/com/topjohnwu/magisk/database/RepoDatabaseHelper.java b/app/src/full/java/com/topjohnwu/magisk/database/RepoDatabaseHelper.java
index 632f5201323c..35356f4ea0dd 100644
--- a/app/src/full/java/com/topjohnwu/magisk/database/RepoDatabaseHelper.java
+++ b/app/src/full/java/com/topjohnwu/magisk/database/RepoDatabaseHelper.java
@@ -8,6 +8,7 @@
 import com.topjohnwu.magisk.Const;
 import com.topjohnwu.magisk.Data;
 import com.topjohnwu.magisk.MagiskManager;
+import com.topjohnwu.magisk.adapters.ReposAdapter;
 import com.topjohnwu.magisk.container.Repo;
 
 import java.util.HashSet;
@@ -20,6 +21,7 @@ public class RepoDatabaseHelper extends SQLiteOpenHelper {
 
     private SQLiteDatabase mDb;
     private MagiskManager mm;
+    private ReposAdapter adapter;
 
     public RepoDatabaseHelper(Context context) {
         super(context, "repo.db", null, DATABASE_VER);
@@ -63,15 +65,18 @@ public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
 
     public void clearRepo() {
         mDb.delete(TABLE_NAME, null, null);
+        notifyAdapter();
     }
 
 
     public void removeRepo(String id) {
         mDb.delete(TABLE_NAME, "id=?", new String[] { id });
+        notifyAdapter();
     }
 
     public void removeRepo(Repo repo) {
         mDb.delete(TABLE_NAME, "repo_name=?", new String[] { repo.getRepoName() });
+        notifyAdapter();
     }
 
     public void removeRepo(Iterable<String> list) {
@@ -79,10 +84,12 @@ public void removeRepo(Iterable<String> list) {
             if (id == null) continue;
             mDb.delete(TABLE_NAME, "id=?", new String[] { id });
         }
+        notifyAdapter();
     }
 
     public void addRepo(Repo repo) {
         mDb.replace(TABLE_NAME, null, repo.getContentValues());
+        notifyAdapter();
     }
 
     public Repo getRepo(String id) {
@@ -121,4 +128,18 @@ public Set<String> getRepoIDSet() {
         }
         return set;
     }
+
+    public void registerAdapter(ReposAdapter a) {
+        adapter = a;
+    }
+
+    public void unregisterAdapter() {
+        adapter = null;
+    }
+
+    private void notifyAdapter() {
+        if (adapter != null) {
+            Data.mainHandler.post(adapter::notifyDBChanged);
+        }
+    }
 }