1
- import 'package:bluebubbles/app/components/avatars/contact_avatar_widget.dart' ;
2
1
import 'package:bluebubbles/app/components/circle_progress_bar.dart' ;
3
- import 'package:bluebubbles/app/layouts/conversation_view/pages/conversation_view.dart' ;
4
2
import 'package:bluebubbles/app/wrappers/stateful_boilerplate.dart' ;
5
3
import 'package:bluebubbles/utils/logger/logger.dart' ;
6
4
import 'package:bluebubbles/helpers/helpers.dart' ;
@@ -93,7 +91,7 @@ class FullscreenMediaHolderState extends OptimizedState<FullscreenMediaHolder> {
93
91
child: Scaffold (
94
92
appBar: ! iOS || ! showAppBar
95
93
// AppBar placeholder to prevent shifting of content when toggling the app bar
96
- ? PreferredSize (preferredSize: Size .fromHeight (attachment.message.target == null ? 56 : 88 ), child: Container ())
94
+ ? PreferredSize (preferredSize: const Size .fromHeight (56 ), child: Container ())
97
95
: AppBar (
98
96
leading: XGestureDetector (
99
97
supportTouch: true ,
@@ -122,57 +120,6 @@ class FullscreenMediaHolderState extends OptimizedState<FullscreenMediaHolder> {
122
120
centerTitle: iOS,
123
121
iconTheme: IconThemeData (color: context.theme.colorScheme.primary),
124
122
backgroundColor: context.theme.colorScheme.properSurface,
125
- bottom: (attachment.message.target == null ) ? null : PreferredSize (
126
- preferredSize: const Size .fromHeight (32 ),
127
- child: Column (
128
- children : [
129
- RawChip (
130
- tapEnabled: true ,
131
- side: BorderSide (color: context.theme.colorScheme.outline.withOpacity (0.1 )),
132
- shape: RoundedRectangleBorder (borderRadius: BorderRadius .circular (20 )),
133
- avatar: (attachment.message.target? .isFromMe == true ) ?
134
- ContactAvatarWidget (contact: Contact (id : 'you' , displayName : ss.settings.userName.value, emails : [ss.settings.iCloudAccount.value])) :
135
- ContactAvatarWidget (handle: attachment.message.target? .handle ?? attachment.message.target? .getHandle ()),
136
- label: Wrap (
137
- spacing : 4 ,
138
- crossAxisAlignment: WrapCrossAlignment .center,
139
- children: [
140
- Text ('From ${attachment .message .target ?.isFromMe == true ? 'You' : attachment .message .target ?.handle ?.displayName }' ,
141
- style: TextStyle (
142
- fontSize: 14 ,
143
- fontWeight: FontWeight .normal,
144
- color: context.theme.colorScheme.onSurface
145
- )
146
- ),
147
- Icon (
148
- iOS ? CupertinoIcons .chevron_right : Icons .chevron_right,
149
- color: context.theme.colorScheme.onSurface.withOpacity (0.6 ),
150
- size: 14 ,
151
- ),
152
- ],
153
- ),
154
- onSelected: (selected) {
155
- if (attachment.message.target? .chat.target != null ) {
156
- final attachmentChat = attachment.message.target! .chat.target! ;
157
- final service = ms (attachmentChat.guid);
158
- service.method = "network" ;
159
- service.struct.addMessages ([attachment.message.target! ]);
160
- ns.pushAndRemoveUntil (
161
- context,
162
- ConversationView (
163
- chat: attachmentChat,
164
- customService: service,
165
- ),
166
- (route) => route.isFirst,
167
- );
168
- } else {
169
- // Gracefully show a "Failed to jump to message" pill notification
170
- }
171
- },
172
- )
173
- ]
174
- )
175
- ),
176
123
systemOverlayStyle: context.theme.colorScheme.brightness == Brightness .dark
177
124
? SystemUiOverlayStyle .light
178
125
: SystemUiOverlayStyle .dark,
@@ -363,4 +310,4 @@ class FullscreenMediaHolderState extends OptimizedState<FullscreenMediaHolder> {
363
310
),
364
311
);
365
312
}
366
- }
313
+ }
0 commit comments