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: ### Features:
- New status feature - New status feature
- HTML rendering of messages - HTML rendering of messages

View file

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

View file

@ -64,13 +64,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.3" version: "1.1.3"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
collection: collection:
dependency: transitive dependency: transitive
description: description:
@ -120,13 +113,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.3" version: "1.3.3"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
famedlysdk: famedlysdk:
dependency: "direct main" dependency: "direct main"
description: description:
@ -467,7 +453,7 @@ packages:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.7.0" version: "1.6.4"
path_drawing: path_drawing:
dependency: transitive dependency: transitive
description: description:
@ -545,6 +531,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.4.2" version: "1.4.2"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
receive_sharing_intent: receive_sharing_intent:
dependency: "direct main" dependency: "direct main"
description: 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. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 0.13.0+37 version: 0.13.1+38
environment: environment:
sdk: ">=2.6.0 <3.0.0" sdk: ">=2.6.0 <3.0.0"