Revert "feat: Add default chat wallpaper"
This reverts commit 7d8369ab30.
This commit is contained in:
parent
7d8369ab30
commit
4857684655
7 changed files with 29 additions and 47 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 46 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 118 KiB |
|
|
@ -9,6 +9,7 @@ import 'package:fluffychat/pages/chat/events/message.dart';
|
||||||
import 'package:fluffychat/pages/chat/seen_by_row.dart';
|
import 'package:fluffychat/pages/chat/seen_by_row.dart';
|
||||||
import 'package:fluffychat/pages/chat/typing_indicators.dart';
|
import 'package:fluffychat/pages/chat/typing_indicators.dart';
|
||||||
import 'package:fluffychat/pages/user_bottom_sheet/user_bottom_sheet.dart';
|
import 'package:fluffychat/pages/user_bottom_sheet/user_bottom_sheet.dart';
|
||||||
|
import 'package:fluffychat/utils/account_config.dart';
|
||||||
import 'package:fluffychat/utils/adaptive_bottom_sheet.dart';
|
import 'package:fluffychat/utils/adaptive_bottom_sheet.dart';
|
||||||
import 'package:fluffychat/utils/matrix_sdk_extensions/filtered_timeline_extension.dart';
|
import 'package:fluffychat/utils/matrix_sdk_extensions/filtered_timeline_extension.dart';
|
||||||
import 'package:fluffychat/utils/platform_infos.dart';
|
import 'package:fluffychat/utils/platform_infos.dart';
|
||||||
|
|
@ -33,6 +34,10 @@ class ChatEventList extends StatelessWidget {
|
||||||
for (var i = 0; i < events.length; i++) {
|
for (var i = 0; i < events.length; i++) {
|
||||||
thisEventsKeyMap[events[i].eventId] = i;
|
thisEventsKeyMap[events[i].eventId] = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final hasWallpaper =
|
||||||
|
controller.room.client.applicationAccountConfig.wallpaperUrl != null;
|
||||||
|
|
||||||
return SelectionArea(
|
return SelectionArea(
|
||||||
child: ListView.custom(
|
child: ListView.custom(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
|
|
@ -137,7 +142,8 @@ class ChatEventList extends StatelessWidget {
|
||||||
i > 0 && controller.readMarkerEventId == event.eventId,
|
i > 0 && controller.readMarkerEventId == event.eventId,
|
||||||
nextEvent: i + 1 < events.length ? events[i + 1] : null,
|
nextEvent: i + 1 < events.length ? events[i + 1] : null,
|
||||||
previousEvent: i > 0 ? events[i - 1] : null,
|
previousEvent: i > 0 ? events[i - 1] : null,
|
||||||
avatarPresenceBackgroundColor: Colors.transparent,
|
avatarPresenceBackgroundColor:
|
||||||
|
hasWallpaper ? Colors.transparent : null,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -260,30 +260,18 @@ class ChatView extends StatelessWidget {
|
||||||
onDragExited: controller.onDragExited,
|
onDragExited: controller.onDragExited,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
accountConfig.wallpaperUrl != null
|
if (accountConfig.wallpaperUrl != null)
|
||||||
? Opacity(
|
Opacity(
|
||||||
opacity: accountConfig.wallpaperOpacity ?? 1,
|
opacity: accountConfig.wallpaperOpacity ?? 1,
|
||||||
child: MxcImage(
|
child: MxcImage(
|
||||||
uri: accountConfig.wallpaperUrl,
|
uri: accountConfig.wallpaperUrl,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
isThumbnail: true,
|
isThumbnail: true,
|
||||||
width: FluffyThemes.columnWidth * 4,
|
width: FluffyThemes.columnWidth * 4,
|
||||||
height: FluffyThemes.columnWidth * 4,
|
height: FluffyThemes.columnWidth * 4,
|
||||||
placeholder: (_) => Container(),
|
placeholder: (_) => Container(),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
: ColorFiltered(
|
|
||||||
colorFilter: ColorFilter.mode(
|
|
||||||
theme.colorScheme.surfaceContainerHighest,
|
|
||||||
BlendMode.color,
|
|
||||||
),
|
|
||||||
child: Image.asset(
|
|
||||||
'assets/chat_wallpaper_${theme.brightness.name}.png',
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
width: double.infinity,
|
|
||||||
height: double.infinity,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SafeArea(
|
SafeArea(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
|
|
@ -320,7 +308,10 @@ class ChatView extends StatelessWidget {
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Material(
|
child: Material(
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
color: theme.colorScheme.surfaceBright,
|
color: theme
|
||||||
|
.colorScheme
|
||||||
|
// ignore: deprecated_member_use
|
||||||
|
.surfaceVariant,
|
||||||
borderRadius: const BorderRadius.all(
|
borderRadius: const BorderRadius.all(
|
||||||
Radius.circular(24),
|
Radius.circular(24),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ class Message extends StatelessWidget {
|
||||||
final ownMessage = event.senderId == client.userID;
|
final ownMessage = event.senderId == client.userID;
|
||||||
final alignment = ownMessage ? Alignment.topRight : Alignment.topLeft;
|
final alignment = ownMessage ? Alignment.topRight : Alignment.topLeft;
|
||||||
// ignore: deprecated_member_use
|
// ignore: deprecated_member_use
|
||||||
var color = theme.colorScheme.surfaceBright;
|
var color = theme.colorScheme.surfaceVariant;
|
||||||
final displayTime = event.type == EventTypes.RoomCreate ||
|
final displayTime = event.type == EventTypes.RoomCreate ||
|
||||||
nextEvent == null ||
|
nextEvent == null ||
|
||||||
!event.originServerTs.sameEnvironment(nextEvent!.originServerTs);
|
!event.originServerTs.sameEnvironment(nextEvent!.originServerTs);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||||
import 'package:matrix/matrix.dart';
|
import 'package:matrix/matrix.dart';
|
||||||
|
|
||||||
import 'package:fluffychat/config/app_config.dart';
|
|
||||||
import 'package:fluffychat/utils/date_time_extension.dart';
|
import 'package:fluffychat/utils/date_time_extension.dart';
|
||||||
import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart';
|
import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart';
|
||||||
import 'package:fluffychat/widgets/avatar.dart';
|
import 'package:fluffychat/widgets/avatar.dart';
|
||||||
|
|
@ -28,27 +27,11 @@ class RoomCreationStateEvent extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
roomName,
|
roomName,
|
||||||
style: TextStyle(
|
style: theme.textTheme.headlineSmall,
|
||||||
fontSize: 24 * AppConfig.fontSizeFactor,
|
|
||||||
shadows: [
|
|
||||||
Shadow(
|
|
||||||
color: theme.colorScheme.surface,
|
|
||||||
blurRadius: 3,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'${event.originServerTs.localizedTime(context)} | ${l10n.countParticipants((event.room.summary.mJoinedMemberCount ?? 1) + (event.room.summary.mInvitedMemberCount ?? 0))}',
|
'${event.originServerTs.localizedTime(context)} | ${l10n.countParticipants((event.room.summary.mJoinedMemberCount ?? 1) + (event.room.summary.mInvitedMemberCount ?? 0))}',
|
||||||
style: TextStyle(
|
style: theme.textTheme.labelSmall,
|
||||||
fontSize: 12 * AppConfig.fontSizeFactor,
|
|
||||||
shadows: [
|
|
||||||
Shadow(
|
|
||||||
color: theme.colorScheme.surface,
|
|
||||||
blurRadius: 3,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
const SizedBox(height: 48),
|
const SizedBox(height: 48),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,9 @@ class TypingIndicators extends StatelessWidget {
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Material(
|
Material(
|
||||||
color: theme.colorScheme.surfaceBright,
|
color:
|
||||||
|
// ignore: deprecated_member_use
|
||||||
|
theme.colorScheme.surfaceVariant,
|
||||||
borderRadius: const BorderRadius.all(
|
borderRadius: const BorderRadius.all(
|
||||||
Radius.circular(AppConfig.borderRadius),
|
Radius.circular(AppConfig.borderRadius),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue