mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-30 16:29:30 +01:00
Merge branch 'krille/minor-fixes' into 'main'
Krille/minor fixes See merge request famedly/fluffychat!571
This commit is contained in:
commit
f6699bf87f
@ -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';
|
||||
|
@ -135,7 +135,7 @@ abstract class FluffyThemes {
|
||||
primary: FluffyThemes.lighten(AppConfig.chatColor, 0.33),
|
||||
secondary: FluffyThemes.lighten(AppConfig.chatColor, 0.33),
|
||||
secondaryVariant: AppConfig.secondaryColor,
|
||||
surface: FluffyThemes.darken(AppConfig.chatColor, 0.4),
|
||||
surface: FluffyThemes.darken(AppConfig.chatColor, 0.35),
|
||||
),
|
||||
secondaryHeaderColor: Colors.blueGrey.shade900,
|
||||
textTheme: Typography.material2018().white.merge(fallbackTextTheme),
|
||||
|
@ -83,7 +83,10 @@ class ChatView extends StatelessWidget {
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Icon(Icons.report_outlined),
|
||||
const Icon(
|
||||
Icons.shield_outlined,
|
||||
color: Colors.red,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Text(L10n.of(context).reportMessage),
|
||||
],
|
||||
@ -331,7 +334,7 @@ class ChatView extends StatelessWidget {
|
||||
.secondaryHeaderColor
|
||||
.withAlpha(100),
|
||||
clipBehavior: Clip.hardEdge,
|
||||
color: Theme.of(context).backgroundColor,
|
||||
color: Theme.of(context).appBarTheme.backgroundColor,
|
||||
child: SafeArea(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/utils/date_time_extension.dart';
|
||||
import 'package:fluffychat/widgets/avatar.dart';
|
||||
|
||||
@ -52,7 +53,7 @@ class EventInfoDialog extends StatelessWidget {
|
||||
),
|
||||
title: Text(L10n.of(context).sender),
|
||||
subtitle:
|
||||
Text('${event.sender.calcDisplayname()} <${event.senderId}>'),
|
||||
Text('${event.sender.calcDisplayname()} [${event.senderId}]'),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10n.of(context).time),
|
||||
@ -62,14 +63,17 @@ class EventInfoDialog extends StatelessWidget {
|
||||
title: Text(L10n.of(context).messageType),
|
||||
subtitle: Text(event.humanreadableType),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(L10n.of(context).sourceCode),
|
||||
),
|
||||
ListTile(title: Text('${L10n.of(context).sourceCode}:')),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Material(
|
||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(8),
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Text(prettyJson),
|
||||
child: SelectableText(prettyJson),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -220,7 +220,9 @@ class Message extends StatelessWidget {
|
||||
),
|
||||
if (event.hasAggregatedEvents(
|
||||
timeline, RelationshipTypes.edit))
|
||||
Row(
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 4.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
@ -237,6 +239,7 @@ class Message extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
@ -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