Skip to content

Commit 3a8c22c

Browse files
fix: Fix register modal button click handling and add mask state
1 parent 3fcf924 commit 3a8c22c

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/register/register_screen.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ live_design! {
350350
text: "Back to Login"
351351
}
352352
}
353-
353+
354354
// Modal for registration status (both password and SSO)
355355
status_modal = <Modal> {
356356
content: {
@@ -399,7 +399,7 @@ impl RegisterScreen {
399399
self.update_button_mask(&register_button, cx, 0.0);
400400
self.redraw(cx);
401401
}
402-
402+
403403
fn update_registration_mode(&mut self, cx: &mut Cx) {
404404
let is_matrix_org = self.selected_homeserver == "matrix.org" || self.selected_homeserver.is_empty();
405405

@@ -449,13 +449,13 @@ impl MatchEvent for RegisterScreen {
449449
if edit_button.clicked(actions) {
450450
self.toggle_homeserver_options(cx);
451451
}
452-
452+
453453
// Handle SSO button click for matrix.org
454454
if sso_button.clicked(actions) && !self.sso_pending {
455455
// Mark SSO as pending for this screen
456456
self.sso_pending = true;
457457
self.update_button_mask(&sso_button, cx, 1.0);
458-
458+
459459
// Use the same SSO flow as login screen - spawn SSO server with Google provider
460460
// This follows Element's implementation where SSO login and registration share the same OAuth flow
461461
// The Matrix server will handle whether to create a new account or login existing user
@@ -583,7 +583,7 @@ impl MatchEvent for RegisterScreen {
583583
self.update_button_mask(&sso_button, cx, 0.0);
584584
}
585585
}
586-
586+
587587
// Handle SSO login actions
588588
match action.downcast_ref::<LoginAction>() {
589589
Some(LoginAction::SsoPending(pending)) => {

src/sliding_sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ async fn async_worker(
626626
enqueue_popup_notification(PopupItem {
627627
message: error_msg.clone(),
628628
kind: PopupKind::Error,
629-
auto_dismissal_duration: Some(5.0),
629+
auto_dismissal_duration: None,
630630
});
631631
Cx::post_action(RegisterAction::RegistrationFailure(error_msg));
632632
}

0 commit comments

Comments
 (0)