Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TW-1862: Fix can't display message in chat #2095

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions lib/pages/chat/chat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,14 @@ class ChatController extends State<Chat>

Future<void> requestHistory({
int? historyCount,
StateFilter? filter,
}) async {
if (!timeline!.canRequestHistory) return;
Logs().v('Chat::requestHistory(): Requesting history...');
try {
return timeline!.requestHistory(
historyCount: historyCount ?? _loadHistoryCount,
filter: filter,
);
} catch (err) {
ScaffoldMessenger.of(context).showSnackBar(
Expand Down Expand Up @@ -1748,10 +1750,19 @@ class ChatController extends State<Chat>
if (allMembershipEvents || canRequestHistory) {
try {
await requestHistory(historyCount: _defaultEventCountDisplay)
.then((response) {
Logs().d(
.then((response) async {
Logs().v(
'Chat::_tryRequestHistory():: Try request history success',
);
if (allMembershipEvents) {
await requestHistory(
historyCount: _defaultEventCountDisplay,
filter: StateFilter(
lazyLoadMembers: true,
types: [EventTypes.Message],
Copy link
Member

@hoangdat hoangdat Oct 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about Encrypted, Sticker, .....?

),
);
}
});
} catch (e) {
Logs().e(
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1875,8 +1875,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: "twake-supported-0.22.6"
resolved-ref: "8435e632d7bce166085c6426fbfb4173457526f9"
ref: support-filter-for-request-history
resolved-ref: "420ed04a43f14b15aec6dda50fdad9d23b39414d"
url: "git@github.com:linagora/matrix-dart-sdk.git"
source: git
version: "0.22.6"
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
matrix:
git:
url: git@github.com:linagora/matrix-dart-sdk.git
ref: twake-supported-0.22.6
ref: support-filter-for-request-history
hoangdat marked this conversation as resolved.
Show resolved Hide resolved

receive_sharing_intent:
git:
Expand Down