mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 16:33:39 +00:00
Merge pull request #260 from joeykrim/patch-2
Changed new Thread() to use new AsyncTask()
This commit is contained in:
commit
f66710a7ea
@ -25,12 +25,13 @@ public class Trimmer {
|
||||
if (!trimmingEnabled)
|
||||
return;
|
||||
|
||||
new Thread() {
|
||||
new AsyncTask<Void, Void, Void>() {
|
||||
@Override
|
||||
public void run() {
|
||||
protected Void doInBackground(Void... params) {
|
||||
DatabaseFactory.getThreadDatabase(context).trimThread(threadId, threadLengthLimit);
|
||||
return null;
|
||||
}
|
||||
}.start();
|
||||
}.execute();
|
||||
}
|
||||
|
||||
private static class TrimmingProgressTask extends AsyncTask<Integer, Integer, Void> implements ThreadDatabase.ProgressListener {
|
||||
|
Loading…
x
Reference in New Issue
Block a user