mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-12 06:05:10 -04:00
qol[mcAccountSpinner]: Remove error that appears when opening app without internet
This commit is contained in:
parent
4170e090f7
commit
df5e2067da
@ -9,6 +9,7 @@ import android.graphics.Color;
|
|||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
import android.graphics.drawable.BitmapDrawable;
|
import android.graphics.drawable.BitmapDrawable;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.net.NetworkInfo;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@ -276,6 +277,10 @@ public class mcAccountSpinner extends AppCompatSpinner implements AdapterView.On
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void performLogin(MinecraftAccount minecraftAccount){
|
private void performLogin(MinecraftAccount minecraftAccount){
|
||||||
|
// Logging in when there's no internet is useless. This should really be turned into a network callback though.
|
||||||
|
if(!Tools.isOnline(getContext())){
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(minecraftAccount.isLocal()) return;
|
if(minecraftAccount.isLocal()) return;
|
||||||
|
|
||||||
mLoginBarPaint.setColor(getResources().getColor(R.color.minebutton_color));
|
mLoginBarPaint.setColor(getResources().getColor(R.color.minebutton_color));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user