Skip to content

Commit

Permalink
Fixes kollerlukas#270 using MediaProvider.dataChanged
Browse files Browse the repository at this point in the history
  • Loading branch information
Jahhow committed Apr 11, 2020
1 parent 89998a3 commit c6a53cf
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,18 @@ public static void pinPath(Context context, String path) {

if (!pinnedPaths.contains(path)) {
pinnedPaths.add(path);
MediaProvider.dataChanged = true;
}
}

public static void unpinPath(Context context, String path) {
if (pinnedPaths == null) {
pinnedPaths = loadPinnedPaths(context);
}

pinnedPaths.remove(path);
if (pinnedPaths.contains(path)) {
MediaProvider.dataChanged = true;
pinnedPaths.remove(path);
}
}

public static ArrayList<String> loadPinnedPaths(Context context) {
Expand Down

0 comments on commit c6a53cf

Please sign in to comment.