mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 14:47:29 +00:00
Use Toast instead of SnackBar. Probable workaround for austinhuang0131/barinsta#1027
This commit is contained in:
parent
109d08c59f
commit
1dfe5f623c
@ -1,14 +1,12 @@
|
|||||||
package awais.instagrabber.webservices.interceptors;
|
package awais.instagrabber.webservices.interceptors;
|
||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
|
||||||
import com.google.android.material.snackbar.Snackbar;
|
|
||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -105,9 +103,9 @@ public class IgErrorsInterceptor implements Interceptor {
|
|||||||
private void showSnackbar(final String message) {
|
private void showSnackbar(final String message) {
|
||||||
final MainActivity mainActivity = MainActivity.getInstance();
|
final MainActivity mainActivity = MainActivity.getInstance();
|
||||||
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;
|
||||||
Snackbar.make(view, message, Snackbar.LENGTH_LONG).show();
|
Toast.makeText(mainActivity.getApplicationContext(), message, Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
|
Loading…
Reference in New Issue
Block a user