mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-17 08:15:09 +00:00
feat: Open im.fluffychat uris
This commit is contained in:
parent
42d5c1a497
commit
f86c98b78e
2 changed files with 3 additions and 1 deletions
|
@ -43,6 +43,7 @@ abstract class AppConfig {
|
|||
static const bool hideTypingUsernames = false;
|
||||
static const bool hideAllStateEvents = false;
|
||||
static const String inviteLinkPrefix = 'https://matrix.to/#/';
|
||||
static const String deepLinkPrefix = 'im.fluffychat://chat/';
|
||||
static const String schemePrefix = 'matrix:';
|
||||
static const String pushNotificationsChannelId = 'fluffychat_push';
|
||||
static const String pushNotificationsChannelName = 'FluffyChat push channel';
|
||||
|
|
|
@ -20,7 +20,8 @@ class UrlLauncher {
|
|||
const UrlLauncher(this.context, this.url);
|
||||
|
||||
void launchUrl() {
|
||||
if (url.toLowerCase().startsWith(AppConfig.inviteLinkPrefix) ||
|
||||
if (url.toLowerCase().startsWith(AppConfig.deepLinkPrefix) ||
|
||||
url.toLowerCase().startsWith(AppConfig.inviteLinkPrefix) ||
|
||||
{'#', '@', '!', '+', '\$'}.contains(url[0]) ||
|
||||
url.toLowerCase().startsWith(AppConfig.schemePrefix)) {
|
||||
return openMatrixToUrl();
|
||||
|
|
Loading…
Reference in a new issue