Compare commits
No commits in common. "47c535910d3d86eea07dfa9d5eebf9ae601ea1de" and "f5fbe1f483dae14295c70f232b3ec4558dd27a98" have entirely different histories.
47c535910d
...
f5fbe1f483
@ -26,7 +26,6 @@ import 'package:solian/widgets/chat/chat_event_list.dart';
|
||||
import 'package:solian/widgets/chat/chat_message_input.dart';
|
||||
import 'package:solian/widgets/chat/chat_typing_indicator.dart';
|
||||
import 'package:solian/widgets/current_state_action.dart';
|
||||
import 'package:solian/widgets/root_container.dart';
|
||||
|
||||
class ChannelChatScreen extends StatefulWidget {
|
||||
final String alias;
|
||||
@ -218,8 +217,7 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
);
|
||||
}
|
||||
|
||||
return RootContainer(
|
||||
child: Scaffold(
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: AppBarLeadingButton.adaptive(context),
|
||||
title: AppBarTitle(title),
|
||||
@ -255,8 +253,7 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
.then((value) {
|
||||
if (value == false) AppRouter.instance.pop();
|
||||
if (value != null) {
|
||||
final resp =
|
||||
Channel.fromJson(value as Map<String, dynamic>);
|
||||
final resp = Channel.fromJson(value as Map<String, dynamic>);
|
||||
_getChannel(alias: resp.alias);
|
||||
}
|
||||
});
|
||||
@ -293,8 +290,7 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
Expanded(
|
||||
child: ChatEventList(
|
||||
noAnimated:
|
||||
_prefs.getBool('non_animated_message_list') ??
|
||||
false,
|
||||
_prefs.getBool('non_animated_message_list') ?? false,
|
||||
scope: widget.realm,
|
||||
channel: _channel!,
|
||||
chatController: _chatController,
|
||||
@ -360,7 +356,6 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
],
|
||||
);
|
||||
}),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -177,6 +177,9 @@ class _AttachmentListState extends State<AttachmentList> {
|
||||
if (element == null) return const SizedBox.shrink();
|
||||
double ratio = element.metadata?['ratio']?.toDouble() ?? 16 / 9;
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surfaceContainerHigh,
|
||||
),
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: widget.columnMaxWidth,
|
||||
maxHeight: 640,
|
||||
@ -244,7 +247,7 @@ class _AttachmentListState extends State<AttachmentList> {
|
||||
maxHeight: widget.flatMaxHeight,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
color: Theme.of(context).colorScheme.surfaceContainerHigh,
|
||||
border: Border.symmetric(
|
||||
horizontal: BorderSide(
|
||||
width: 0.3,
|
||||
@ -254,7 +257,6 @@ class _AttachmentListState extends State<AttachmentList> {
|
||||
),
|
||||
child: CarouselSlider.builder(
|
||||
options: CarouselOptions(
|
||||
animateToClosest: true,
|
||||
aspectRatio: _aspectRatio,
|
||||
viewportFraction:
|
||||
widget.viewport ?? (widget.attachmentsId.length > 1 ? 0.95 : 1),
|
||||
@ -317,7 +319,6 @@ class AttachmentListEntry extends StatelessWidget {
|
||||
width: width ?? MediaQuery.of(context).size.width,
|
||||
height: height,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
border: showBorder
|
||||
? Border.symmetric(
|
||||
vertical: BorderSide(
|
||||
|
@ -117,15 +117,29 @@ class _PostItemState extends State<PostItem> {
|
||||
),
|
||||
),
|
||||
),
|
||||
if (_contentHeight >= 80 && !widget.isFullContent)
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: IgnorePointer(
|
||||
child: Container(
|
||||
height: 80,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.bottomCenter,
|
||||
end: Alignment.topCenter,
|
||||
colors: [
|
||||
Theme.of(context).colorScheme.surfaceContainerLow,
|
||||
Theme.of(context)
|
||||
.colorScheme
|
||||
.surface
|
||||
.withOpacity(0),
|
||||
],
|
||||
),
|
||||
if (_contentHeight >= 80 && !widget.isFullContent)
|
||||
Opacity(
|
||||
opacity: 0.8,
|
||||
child: InkWell(child: Text('readMore'.tr)),
|
||||
).paddingOnly(
|
||||
left: 12,
|
||||
top: 4,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
LinkExpansion(content: item.body['content']).paddingOnly(
|
||||
left: 8,
|
||||
@ -211,15 +225,33 @@ class _PostItemState extends State<PostItem> {
|
||||
),
|
||||
),
|
||||
),
|
||||
if (_contentHeight >= 320 && !widget.isFullContent)
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: IgnorePointer(
|
||||
child: Container(
|
||||
height: 320,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.bottomCenter,
|
||||
end: Alignment.topCenter,
|
||||
colors: [
|
||||
(widget.backgroundColor ??
|
||||
Theme.of(context)
|
||||
.colorScheme
|
||||
.surface),
|
||||
(widget.backgroundColor ??
|
||||
Theme.of(context)
|
||||
.colorScheme
|
||||
.surface)
|
||||
.withOpacity(0),
|
||||
],
|
||||
),
|
||||
if (_contentHeight >= 320 && !widget.isFullContent)
|
||||
Opacity(
|
||||
opacity: 0.8,
|
||||
child: InkWell(child: Text('readMore'.tr)),
|
||||
).paddingOnly(
|
||||
left: 12,
|
||||
top: 4,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (widget.item.replyTo != null && widget.isShowEmbed)
|
||||
Container(
|
||||
@ -304,7 +336,8 @@ class _PostItemState extends State<PostItem> {
|
||||
),
|
||||
closedElevation: 0,
|
||||
openElevation: 0,
|
||||
closedColor: Colors.transparent,
|
||||
closedColor:
|
||||
widget.backgroundColor ?? Theme.of(context).colorScheme.surface,
|
||||
openColor: Theme.of(context).colorScheme.surface,
|
||||
);
|
||||
}
|
||||
@ -541,7 +574,7 @@ class _PostEmbedWidget extends StatelessWidget {
|
||||
),
|
||||
closedElevation: 0,
|
||||
openElevation: 0,
|
||||
closedColor: Colors.transparent,
|
||||
closedColor: Theme.of(context).colorScheme.surface,
|
||||
openColor: Theme.of(context).colorScheme.surface,
|
||||
);
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ class RootContainer extends StatelessWidget {
|
||||
backgroundBlendMode: BlendMode.darken,
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
image: DecorationImage(
|
||||
opacity: 0.2,
|
||||
opacity: 0.5,
|
||||
image: FileImage(file),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user