Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Migration_18_19.java « migration « persistence « notes « owncloud « niedermann « it « java « main « src « app - github.com/stefan-niedermann/nextcloud-notes.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a3205db0d81be0f025729912e0a5e074cbbbc010 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package it.niedermann.owncloud.notes.persistence.migration;

import android.content.Context;
import android.util.Log;

import androidx.annotation.NonNull;

import com.bumptech.glide.Glide;

public class Migration_18_19 {
    private static final String TAG = Migration_18_19.class.getSimpleName();

    /**
     * Clears the {@link Glide} disk cache to fix wrong avatars in a multi user setup
     * https://github.com/stefan-niedermann/nextcloud-deck/issues/531
     *
     * @param context {@link Context}
     */
    public Migration_18_19(@NonNull Context context) {
        new Thread(() -> {
            Log.i(TAG, "Clearing Glide disk cache");
            Glide.get(context.getApplicationContext()).clearDiskCache();
        }).start();
    }
}