Improve trust toggle responsiveness

Andreas Straub created

Removed unnecessary UI refreshes, explicitly update UI where needed.

Change summary

src/main/java/eu/siacs/conversations/ui/XmppActivity.java | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

Detailed changes

src/main/java/eu/siacs/conversations/ui/XmppActivity.java 🔗

@@ -621,9 +621,6 @@ public abstract class XmppActivity extends Activity {
 									(isChecked) ? SQLiteAxolotlStore.Trust.TRUSTED :
 											SQLiteAxolotlStore.Trust.UNTRUSTED);
 						}
-						refreshUi();
-						xmppConnectionService.updateAccountUi();
-						xmppConnectionService.updateConversationUi();
 					}
 				},
 				new View.OnClickListener() {
@@ -631,9 +628,7 @@ public abstract class XmppActivity extends Activity {
 					public void onClick(View v) {
 						account.getAxolotlService().setFingerprintTrust(fingerprint,
 								SQLiteAxolotlStore.Trust.UNTRUSTED);
-						refreshUi();
-						xmppConnectionService.updateAccountUi();
-						xmppConnectionService.updateConversationUi();
+						v.setEnabled(true);
 					}
 				}