blob: ee233614a6fc425554ad8d2e76c93cd5f1e65cea (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package ml.docilealligator.infinityforreddit.asynctasks;
import android.os.Handler;
import java.util.concurrent.Executor;
import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
public class DeleteAllUsers {
public static void deleteAllUsers(Executor executor, Handler handler, RedditDataRoomDatabase redditDataRoomDatabase,
DeleteAllUsersListener deleteAllUsersListener) {
executor.execute(() -> {
redditDataRoomDatabase.userDao().deleteAllUsers();
handler.post(deleteAllUsersListener::success);
});
}
public interface DeleteAllUsersListener {
void success();
}
}
|