forked from mirrors/Fedilab
		
	Fix #22 - Add a "disable" button from alertdialog
This commit is contained in:
		
							parent
							
								
									8fcbe19d4d
								
							
						
					
					
						commit
						e53a9e1f87
					
				
					 2 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -66,6 +66,12 @@ public class PushHelper {
 | 
			
		|||
                            message.setMovementMethod(LinkMovementMethod.getInstance());
 | 
			
		||||
                            alert.setView(message);
 | 
			
		||||
                            alert.setPositiveButton(R.string.close, (dialog, whichButton) -> dialog.dismiss());
 | 
			
		||||
                            alert.setNegativeButton(R.string.disable, (dialog, whichButton) -> {
 | 
			
		||||
                                SharedPreferences.Editor editor = prefs.edit();
 | 
			
		||||
                                editor.putString(context.getString(R.string.SET_NOTIFICATION_TYPE), "REPEAT_NOTIFICATIONS");
 | 
			
		||||
                                editor.apply();
 | 
			
		||||
                                dialog.dismiss();
 | 
			
		||||
                            });
 | 
			
		||||
                            alert.show();
 | 
			
		||||
                        } else {
 | 
			
		||||
                            registerAppWithDialog(context, accounts);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -84,6 +84,7 @@
 | 
			
		|||
    <string name="insert_emoji">Insert emoji</string>
 | 
			
		||||
    <string name="no_emoji">The app did not collect custom emojis for the moment.</string>
 | 
			
		||||
    <string name="push_notif">Push notifications</string>
 | 
			
		||||
 | 
			
		||||
    <string name="logout_confirmation">Are you sure you want to logout?</string>
 | 
			
		||||
    <string name="logout_account_confirmation">Are you sure you want to logout @%1$s@%2$s?</string>
 | 
			
		||||
    <!-- Status -->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue