Fix share content

This commit is contained in:
Christian Pauly 2020-05-11 08:06:24 +02:00
parent 6f91e567b5
commit 1248e519b0
4 changed files with 63 additions and 70 deletions

View file

@ -1,4 +1,8 @@
# Version 0.13.0 - 2020-??-??
# Version 0.13.1 - 2020-05-11
### Fixes:
- Fix share content
# Version 0.13.0 - 2020-05-10
### Features:
- New status feature
- HTML rendering of messages

View file

@ -392,61 +392,57 @@ class _ChatListState extends State<ChatList> {
final int publicRoomsCount =
(publicRoomsResponse?.publicRooms?.length ?? 0);
final int totalCount = rooms.length + publicRoomsCount;
return selectMode == SelectMode.share
? Container()
: ListView.separated(
controller: _scrollController,
separatorBuilder: (BuildContext context,
int i) =>
i == totalCount - publicRoomsCount
? Material(
elevation: 2,
child: ListTile(
title: Text(
L10n.of(context).publicRooms),
),
)
: Container(),
itemCount: totalCount + 1,
itemBuilder: (BuildContext context, int i) {
if (i == 0) {
return Matrix.of(context)
return ListView.separated(
controller: _scrollController,
separatorBuilder: (BuildContext context, int i) =>
i == totalCount - publicRoomsCount
? Material(
elevation: 2,
child: ListTile(
title: Text(
L10n.of(context).publicRooms),
),
)
: Container(),
itemCount: totalCount + 1,
itemBuilder: (BuildContext context, int i) {
if (i == 0) {
return (Matrix.of(context)
.client
.statusList
.isEmpty
? Container()
: PreferredSize(
preferredSize: Size.fromHeight(89),
child: Container(
height: 81,
child: ListView.builder(
scrollDirection:
Axis.horizontal,
itemCount: Matrix.of(context)
.client
.statusList
.length,
itemBuilder:
(BuildContext context,
int i) =>
PresenceListItem(
Matrix.of(context)
.client
.statusList[i]),
),
),
);
}
i--;
return i < rooms.length
? ChatListItem(
rooms[i],
activeChat:
widget.activeChat == rooms[i].id,
)
: PublicRoomListItem(publicRoomsResponse
.publicRooms[i - rooms.length]);
});
.isEmpty ||
selectMode == SelectMode.share)
? Container()
: PreferredSize(
preferredSize: Size.fromHeight(89),
child: Container(
height: 81,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: Matrix.of(context)
.client
.statusList
.length,
itemBuilder:
(BuildContext context, int i) =>
PresenceListItem(
Matrix.of(context)
.client
.statusList[i]),
),
),
);
}
i--;
return i < rooms.length
? ChatListItem(
rooms[i],
activeChat:
widget.activeChat == rooms[i].id,
)
: PublicRoomListItem(publicRoomsResponse
.publicRooms[i - rooms.length]);
});
} else {
return Center(
child: CircularProgressIndicator(),

View file

@ -64,13 +64,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.3"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
collection:
dependency: transitive
description:
@ -120,13 +113,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.3"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
famedlysdk:
dependency: "direct main"
description:
@ -467,7 +453,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.6.4"
path_drawing:
dependency: transitive
description:
@ -545,6 +531,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.2"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
receive_sharing_intent:
dependency: "direct main"
description:

View file

@ -11,7 +11,7 @@ description: Chat with your friends.
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 0.13.0+37
version: 0.13.1+38
environment:
sdk: ">=2.6.0 <3.0.0"