feat: Open im.fluffychat uris
This commit is contained in:
parent
75f3574725
commit
7b412bb8b9
@ -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 New Issue
Block a user