change send button text when disabled

This commit is contained in:
OmarHatem
2025-08-04 03:13:20 +03:00
parent 20b455d6e1
commit 155b9ab32c
+12 -3
View File
@@ -470,9 +470,7 @@ class SendPage extends BasePage {
},
);
},
text: sendViewModel.payjoinUri != null
? S.of(context).send_payjoin
: S.of(context).send,
text: _sendButtonText(context),
color: Theme.of(context).colorScheme.primary,
textColor: Theme.of(context).colorScheme.onPrimary,
isLoading: sendViewModel.state is IsExecutingState ||
@@ -841,4 +839,15 @@ class SendPage extends BasePage {
return isValid;
}
String _sendButtonText(BuildContext context) {
if (!sendViewModel.isReadyForSend) {
return S.of(context).synchronizing;
}
if (sendViewModel.payjoinUri != null) {
return S.of(context).send_payjoin;
} else {
return S.of(context).send;
}
}
}