File tree Expand file tree Collapse file tree
app_pojavlauncher/src/main Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848import java .util .ArrayList ;
4949import java .util .HashMap ;
5050import java .util .List ;
51+ import java .util .Objects ;
5152
5253import fr .spse .extended_view .ExtendedTextView ;
5354
@@ -301,14 +302,23 @@ private void pickAccount(int position){
301302 PojavProfile .setCurrentProfile (getContext (), mAccountList .get (position ));
302303 selectedAccount = PojavProfile .getCurrentProfileContent (getContext (), mAccountList .get (position ));
303304
304-
305305 // WORKAROUND
306306 // Account file corrupted due to previous versions having improper encoding
307307 if (selectedAccount == null ){
308- removeCurrentAccount ();
309- pickAccount (-1 );
310- setSelection (0 );
311- return ;
308+ Context ctx = Objects .requireNonNull (getContext ());
309+
310+ new AlertDialog .Builder (ctx )
311+ .setCancelable (false )
312+ .setTitle (R .string .account_corrupted )
313+ .setMessage (R .string .login_again )
314+ .setPositiveButton (R .string .delete_account_and_login , (dialog , which ) -> {
315+ removeCurrentAccount ();
316+ pickAccount (-1 );
317+ setSelection (0 );
318+ })
319+ .show ();
320+
321+
312322 }
313323 setSelection (position );
314324 }else {
Original file line number Diff line number Diff line change 450450 <string name =" change_account" >Please change accounts to use this function</string >
451451 <string name =" no_minecraft_account_found" >No Minecraft Account Found</string >
452452 <string name =" feature_requires_java_account" >This feature requires a Microsoft account that owns Minecraft Java Edition.</string >
453+ <string name =" delete_account_and_login" >Delete account and log in</string >
454+ <string name =" login_again" >Please log in again</string >
455+ <string name =" account_corrupted" >Selected account is corrupted</string >
453456</resources >
You can’t perform that action at this time.
0 commit comments