mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 14:47:29 +00:00
Fix for Looper.prepare()
This commit is contained in:
parent
d819928eb3
commit
63dc69e13c
@ -14,6 +14,7 @@ import java.io.IOException;
|
|||||||
import awais.instagrabber.R;
|
import awais.instagrabber.R;
|
||||||
import awais.instagrabber.activities.MainActivity;
|
import awais.instagrabber.activities.MainActivity;
|
||||||
import awais.instagrabber.dialogs.ConfirmDialogFragment;
|
import awais.instagrabber.dialogs.ConfirmDialogFragment;
|
||||||
|
import awais.instagrabber.utils.AppExecutors;
|
||||||
import awais.instagrabber.utils.Constants;
|
import awais.instagrabber.utils.Constants;
|
||||||
import awais.instagrabber.utils.TextUtils;
|
import awais.instagrabber.utils.TextUtils;
|
||||||
import okhttp3.Interceptor;
|
import okhttp3.Interceptor;
|
||||||
@ -105,7 +106,13 @@ public class IgErrorsInterceptor implements Interceptor {
|
|||||||
if (mainActivity == null) return;
|
if (mainActivity == null) return;
|
||||||
// final View view = mainActivity.getRootView();
|
// final View view = mainActivity.getRootView();
|
||||||
// if (view == null) return;
|
// if (view == null) return;
|
||||||
Toast.makeText(mainActivity.getApplicationContext(), message, Toast.LENGTH_LONG).show();
|
try {
|
||||||
|
AppExecutors.getInstance()
|
||||||
|
.mainThread()
|
||||||
|
.execute(() -> Toast.makeText(mainActivity.getApplicationContext(), message, Toast.LENGTH_LONG).show());
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e(TAG, "showSnackbar: ", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
|
Loading…
Reference in New Issue
Block a user