mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 01:05:17 +00:00
feat: Open im.fluffychat urls
This commit is contained in:
parent
dfcfc8016f
commit
7a68feb5eb
3 changed files with 8 additions and 0 deletions
|
@ -58,6 +58,12 @@
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
<data android:scheme="matrix" />
|
<data android:scheme="matrix" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<data android:scheme="im.fluffychat" />
|
||||||
|
</intent-filter>
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.SEND" />
|
<action android:name="android.intent.action.SEND" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
<array>
|
<array>
|
||||||
<string>ShareMedia</string>
|
<string>ShareMedia</string>
|
||||||
<string>im.fluffychat</string>
|
<string>im.fluffychat</string>
|
||||||
|
<string>matrix</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
|
|
|
@ -129,6 +129,7 @@ class ChatListController extends State<ChatList> {
|
||||||
void _processIncomingUris(String text) async {
|
void _processIncomingUris(String text) async {
|
||||||
if (text == null) return;
|
if (text == null) return;
|
||||||
VRouter.of(context).to('/rooms');
|
VRouter.of(context).to('/rooms');
|
||||||
|
text = text.replaceFirst('im.fluffychat://', 'matrix:');
|
||||||
UrlLauncher(context, text).openMatrixToUrl();
|
UrlLauncher(context, text).openMatrixToUrl();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue