mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-20 11:09:25 +01:00
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 hideTypingUsernames = false;
|
||||||
static const bool hideAllStateEvents = false;
|
static const bool hideAllStateEvents = false;
|
||||||
static const String inviteLinkPrefix = 'https://matrix.to/#/';
|
static const String inviteLinkPrefix = 'https://matrix.to/#/';
|
||||||
|
static const String deepLinkPrefix = 'im.fluffychat://chat/';
|
||||||
static const String schemePrefix = 'matrix:';
|
static const String schemePrefix = 'matrix:';
|
||||||
static const String pushNotificationsChannelId = 'fluffychat_push';
|
static const String pushNotificationsChannelId = 'fluffychat_push';
|
||||||
static const String pushNotificationsChannelName = 'FluffyChat push channel';
|
static const String pushNotificationsChannelName = 'FluffyChat push channel';
|
||||||
|
@ -20,7 +20,8 @@ class UrlLauncher {
|
|||||||
const UrlLauncher(this.context, this.url);
|
const UrlLauncher(this.context, this.url);
|
||||||
|
|
||||||
void launchUrl() {
|
void launchUrl() {
|
||||||
if (url.toLowerCase().startsWith(AppConfig.inviteLinkPrefix) ||
|
if (url.toLowerCase().startsWith(AppConfig.deepLinkPrefix) ||
|
||||||
|
url.toLowerCase().startsWith(AppConfig.inviteLinkPrefix) ||
|
||||||
{'#', '@', '!', '+', '\$'}.contains(url[0]) ||
|
{'#', '@', '!', '+', '\$'}.contains(url[0]) ||
|
||||||
url.toLowerCase().startsWith(AppConfig.schemePrefix)) {
|
url.toLowerCase().startsWith(AppConfig.schemePrefix)) {
|
||||||
return openMatrixToUrl();
|
return openMatrixToUrl();
|
||||||
|
Loading…
Reference in New Issue
Block a user