mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-01-11 18:22:49 +01:00
Merge branch 'krille/refactor-sharing-intent' into 'main'
refactor: Sharing intent See merge request famedly/fluffychat!893
This commit is contained in:
commit
f3b8abd504
@ -142,8 +142,7 @@ class ChatListController extends State<ChatList> with TickerProviderStateMixin {
|
||||
|
||||
void _processIncomingSharedFiles(List<SharedMediaFile> files) {
|
||||
if (files.isEmpty) return;
|
||||
VRouter.of(context).to('/rooms');
|
||||
final file = File(files.first.path);
|
||||
final file = File(files.first.path.replaceFirst('file://', ''));
|
||||
|
||||
Matrix.of(context).shareContent = {
|
||||
'msgtype': 'chat.fluffy.shared_file',
|
||||
@ -152,11 +151,11 @@ class ChatListController extends State<ChatList> with TickerProviderStateMixin {
|
||||
name: file.path,
|
||||
).detectFileType,
|
||||
};
|
||||
VRouter.of(context).to('/rooms');
|
||||
}
|
||||
|
||||
void _processIncomingSharedText(String? text) {
|
||||
if (text == null) return;
|
||||
VRouter.of(context).to('/rooms');
|
||||
if (text.toLowerCase().startsWith(AppConfig.deepLinkPrefix) ||
|
||||
text.toLowerCase().startsWith(AppConfig.inviteLinkPrefix) ||
|
||||
(text.toLowerCase().startsWith(AppConfig.schemePrefix) &&
|
||||
@ -167,6 +166,7 @@ class ChatListController extends State<ChatList> with TickerProviderStateMixin {
|
||||
'msgtype': 'm.text',
|
||||
'body': text,
|
||||
};
|
||||
VRouter.of(context).to('/rooms');
|
||||
}
|
||||
|
||||
void _processIncomingUris(String? text) async {
|
||||
|
@ -266,8 +266,8 @@ class _StoryButton extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Text(
|
||||
Center(
|
||||
child: Text(
|
||||
profile.displayName ?? '',
|
||||
maxLines: 1,
|
||||
textAlign: TextAlign.center,
|
||||
@ -276,7 +276,7 @@ class _StoryButton extends StatelessWidget {
|
||||
fontWeight: unread ? FontWeight.bold : null,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user