This commit is contained in:
@@ -71,5 +71,16 @@ void openExternalUrl(String url) {
|
||||
}
|
||||
|
||||
void reloadApp() {
|
||||
web.window.location.assign(web.window.location.origin);
|
||||
web.window.location.replace(_currentUrlWithoutTelegramLoginToken());
|
||||
}
|
||||
|
||||
String _currentUrlWithoutTelegramLoginToken() {
|
||||
final uri = Uri.parse(web.window.location.href);
|
||||
final queryParameters = Map<String, String>.of(uri.queryParameters)
|
||||
..remove('telegram_login');
|
||||
return uri
|
||||
.replace(
|
||||
queryParameters: queryParameters.isEmpty ? null : queryParameters,
|
||||
)
|
||||
.toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user