Update to version 0.11.0
This commit is contained in:
parent
45cf9a74e8
commit
4bf7cb9f4b
|
@ -1,3 +1,7 @@
|
||||||
|
# Version 0.11.0 - 2020-04-02
|
||||||
|
### Fixes:
|
||||||
|
- Minor bugfixes
|
||||||
|
|
||||||
# Version 0.10.1 - 2020-03-29
|
# Version 0.10.1 - 2020-03-29
|
||||||
### Fixes:
|
### Fixes:
|
||||||
- Fix a lazy loading bug
|
- Fix a lazy loading bug
|
||||||
|
|
|
@ -67,7 +67,7 @@ class _ChatState extends State<_Chat> {
|
||||||
Timer typingTimeout;
|
Timer typingTimeout;
|
||||||
bool currentlyTyping = false;
|
bool currentlyTyping = false;
|
||||||
|
|
||||||
Set<Event> selectedEvents = {};
|
List<Event> selectedEvents = [];
|
||||||
|
|
||||||
Event replyEvent;
|
Event replyEvent;
|
||||||
|
|
||||||
|
@ -261,6 +261,9 @@ class _ChatState extends State<_Chat> {
|
||||||
|
|
||||||
String _getSelectedEventString(BuildContext context) {
|
String _getSelectedEventString(BuildContext context) {
|
||||||
String copyString = "";
|
String copyString = "";
|
||||||
|
if (selectedEvents.length == 1) {
|
||||||
|
return selectedEvents.first.getLocalizedBody(context);
|
||||||
|
}
|
||||||
for (Event event in selectedEvents) {
|
for (Event event in selectedEvents) {
|
||||||
if (copyString.isNotEmpty) copyString += "\n\n";
|
if (copyString.isNotEmpty) copyString += "\n\n";
|
||||||
copyString += event.getLocalizedBody(context, withSenderNamePrefix: true);
|
copyString += event.getLocalizedBody(context, withSenderNamePrefix: true);
|
||||||
|
@ -488,13 +491,22 @@ class _ChatState extends State<_Chat> {
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Message(timeline.events[i - 1],
|
: Message(timeline.events[i - 1],
|
||||||
onSelect: (Event event) => event.redacted
|
onSelect: (Event event) {
|
||||||
? null
|
if (!event.redacted) {
|
||||||
: selectedEvents.contains(event)
|
if (selectedEvents.contains(event)) {
|
||||||
? setState(() =>
|
setState(
|
||||||
selectedEvents.remove(event))
|
() => selectedEvents.remove(event),
|
||||||
: setState(() =>
|
);
|
||||||
selectedEvents.add(event)),
|
} else {
|
||||||
|
setState(
|
||||||
|
() => selectedEvents.add(event),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
selectedEvents.sort(
|
||||||
|
(a, b) => a.time.compareTo(b.time),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
longPressSelect: selectedEvents.isEmpty,
|
longPressSelect: selectedEvents.isEmpty,
|
||||||
selected: selectedEvents
|
selected: selectedEvents
|
||||||
.contains(timeline.events[i - 1]),
|
.contains(timeline.events[i - 1]),
|
||||||
|
|
|
@ -174,6 +174,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
members ??= widget.room.getParticipants();
|
members ??= widget.room.getParticipants();
|
||||||
|
members.removeWhere((u) => u.membership == Membership.leave);
|
||||||
final int actualMembersCount =
|
final int actualMembersCount =
|
||||||
widget.room.mInvitedMemberCount + widget.room.mJoinedMemberCount;
|
widget.room.mInvitedMemberCount + widget.room.mJoinedMemberCount;
|
||||||
final bool canRequestMoreMembers = members.length < actualMembersCount;
|
final bool canRequestMoreMembers = members.length < actualMembersCount;
|
||||||
|
|
|
@ -27,10 +27,14 @@ class _InvitationSelectionState extends State<InvitationSelection> {
|
||||||
Future<List<User>> getContacts(BuildContext context) async {
|
Future<List<User>> getContacts(BuildContext context) async {
|
||||||
final Client client = Matrix.of(context).client;
|
final Client client = Matrix.of(context).client;
|
||||||
List<User> participants = await widget.room.requestParticipants();
|
List<User> participants = await widget.room.requestParticipants();
|
||||||
|
participants.removeWhere(
|
||||||
|
(u) => ![Membership.join, Membership.invite].contains(u.membership),
|
||||||
|
);
|
||||||
List<User> contacts = [];
|
List<User> contacts = [];
|
||||||
Map<String, bool> userMap = {};
|
Map<String, bool> userMap = {};
|
||||||
for (int i = 0; i < client.rooms.length; i++) {
|
for (int i = 0; i < client.rooms.length; i++) {
|
||||||
List<User> roomUsers = client.rooms[i].getParticipants();
|
List<User> roomUsers = client.rooms[i].getParticipants();
|
||||||
|
|
||||||
for (int j = 0; j < roomUsers.length; j++) {
|
for (int j = 0; j < roomUsers.length; j++) {
|
||||||
if (userMap[roomUsers[j].id] != true &&
|
if (userMap[roomUsers[j].id] != true &&
|
||||||
participants.indexWhere((u) => u.id == roomUsers[j].id) == -1) {
|
participants.indexWhere((u) => u.id == roomUsers[j].id) == -1) {
|
||||||
|
@ -39,10 +43,11 @@ class _InvitationSelectionState extends State<InvitationSelection> {
|
||||||
userMap[roomUsers[j].id] = true;
|
userMap[roomUsers[j].id] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
contacts.sort((a, b) => a
|
contacts.sort(
|
||||||
.calcDisplayname()
|
(a, b) => a.calcDisplayname().toLowerCase().compareTo(
|
||||||
.toLowerCase()
|
b.calcDisplayname().toLowerCase(),
|
||||||
.compareTo(b.calcDisplayname().toLowerCase()));
|
),
|
||||||
|
);
|
||||||
return contacts;
|
return contacts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,8 +124,8 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: eb66ec79d431c73d5d752cb237b94da56b92f10f
|
ref: "63a5d5dba37bdf3d1106fdf6f11760bfd7d2904c"
|
||||||
resolved-ref: eb66ec79d431c73d5d752cb237b94da56b92f10f
|
resolved-ref: "63a5d5dba37bdf3d1106fdf6f11760bfd7d2904c"
|
||||||
url: "https://gitlab.com/famedly/famedlysdk.git"
|
url: "https://gitlab.com/famedly/famedlysdk.git"
|
||||||
source: git
|
source: git
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
|
|
|
@ -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.10.0+30
|
version: 0.11.0+31
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.6.0 <3.0.0"
|
sdk: ">=2.6.0 <3.0.0"
|
||||||
|
|
Loading…
Reference in a new issue