Skip to content

Fix routing to support chat. Update delete account content. - #1985

Closed
i5hi wants to merge 4 commits into
developfrom
get-help
Closed

Fix routing to support chat. Update delete account content.#1985
i5hi wants to merge 4 commits into
developfrom
get-help

Conversation

@i5hi

@i5hi i5hi commented Mar 26, 2026

Copy link
Copy Markdown
Collaborator

i5hi added 3 commits March 26, 2026 09:33
…e param for iOS non-superuser, move route to root navigator to fix key conflicts, update delete account message and translations

@kumulynja kumulynja left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still see a lot of query parameters use and imo opinion unneccessary fields and conditions to manage the navigation. I think the whole support chat navigation, including the support chat login, can be managed without all of this by just using push instead of go and then you don't need to explicitly navigate back to somewhere, just use default pop back behavior to go back where the user came from.

Comment on lines +172 to +178
queryParameters:
isIOSNonSuperuser
? {
'backToWalletHome':
'true',
}
: {},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really necessarry? The user will never get on the exchange home screen if non superuser in iOS, so the pushNamed to support chat will never be done from here, only from the wallet home or settings.

Comment on lines 106 to +113
if (fromSupport) {
final isIOSNonSuperuser = Platform.isIOS &&
!(context.read<SettingsCubit>().state.isSuperuser ?? false);
context.goNamed(
context.pushNamed(
ExchangeSupportChatRoute.supportChat.name,
queryParameters:
isIOSNonSuperuser ? {} : {'from': 'exchange'},
queryParameters: isIOSNonSuperuser
? {'backToWalletHome': 'true'}
: {'from': 'exchange'},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here, why is this fromSupport param needed and the from exchange and backToWalletHome parameters? If you just push from screens the user was already allowed to go in, by using normal back behavior, he can never end up on screens he was not allowed to be on. That can only happen if goNamed is used somewhere, but in all of these cases regarding the support login and support chat, it should not be the case. So I feel this is all still too complicated and much of these conditions and queryParameters can just be removed with proper push and back behavior everywhere.

Comment on lines +27 to +34
const ExchangeSupportChatScreen({
super.key,
this.fromExchange = false,
this.backToWalletHome = false,
});

final bool fromExchange;
final bool backToWalletHome;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment, this all feel like hacks and shouldn't be used if goNamed is not used. Since with push you can not go back to somewhere you don't come from.

@i5hi i5hi closed this Apr 15, 2026
@thibistaken
thibistaken deleted the get-help branch May 13, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants