mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-30 16:29:30 +01:00
Fix images
This commit is contained in:
parent
bf36bf6001
commit
ca8edac132
@ -13,7 +13,12 @@ class ImageBubble extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _ImageBubbleState extends State<ImageBubble> {
|
class _ImageBubbleState extends State<ImageBubble> {
|
||||||
MatrixFile _file;
|
static Map<String, MatrixFile> _matrixFileMap = {};
|
||||||
|
MatrixFile get _file => _matrixFileMap[widget.event.eventId];
|
||||||
|
set _file(MatrixFile file) {
|
||||||
|
_matrixFileMap[widget.event.eventId] = file;
|
||||||
|
}
|
||||||
|
|
||||||
dynamic _error;
|
dynamic _error;
|
||||||
|
|
||||||
Future<MatrixFile> _getFile() async {
|
Future<MatrixFile> _getFile() async {
|
||||||
|
@ -211,6 +211,14 @@ class _ChatListState extends State<ChatList> {
|
|||||||
searchMode = false;
|
searchMode = false;
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
: selectMode == SelectMode.share
|
||||||
|
? IconButton(
|
||||||
|
icon: Icon(Icons.close),
|
||||||
|
onPressed: () {
|
||||||
|
Matrix.of(context).shareContent = null;
|
||||||
|
setState(() => selectMode = SelectMode.normal);
|
||||||
|
},
|
||||||
|
)
|
||||||
: null,
|
: null,
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
actions: searchMode
|
actions: searchMode
|
||||||
@ -242,14 +250,6 @@ class _ChatListState extends State<ChatList> {
|
|||||||
icon: Icon(Icons.search),
|
icon: Icon(Icons.search),
|
||||||
onPressed: () => setState(() => searchMode = true),
|
onPressed: () => setState(() => searchMode = true),
|
||||||
),
|
),
|
||||||
if (selectMode == SelectMode.share)
|
|
||||||
IconButton(
|
|
||||||
icon: Icon(Icons.close),
|
|
||||||
onPressed: () {
|
|
||||||
Matrix.of(context).shareContent = null;
|
|
||||||
setState(() => selectMode = SelectMode.normal);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
if (selectMode == SelectMode.normal)
|
if (selectMode == SelectMode.normal)
|
||||||
PopupMenuButton(
|
PopupMenuButton(
|
||||||
onSelected: (String choice) {
|
onSelected: (String choice) {
|
||||||
@ -288,7 +288,9 @@ class _ChatListState extends State<ChatList> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
floatingActionButton: SpeedDial(
|
floatingActionButton: selectMode == SelectMode.share
|
||||||
|
? null
|
||||||
|
: SpeedDial(
|
||||||
child: Icon(Icons.add),
|
child: Icon(Icons.add),
|
||||||
overlayColor: blackWhiteColor(context),
|
overlayColor: blackWhiteColor(context),
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: Colors.white,
|
||||||
|
Loading…
Reference in New Issue
Block a user