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

small performance tweaks for Message #478

Merged
merged 2 commits into from
Jul 28, 2023
Merged
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
14 changes: 6 additions & 8 deletions lib/pages/chat/events/message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ class Message extends StatelessWidget {
nextEvent == null ||
!event.originServerTs.sameEnvironment(nextEvent!.originServerTs);
final sameSender = nextEvent != null &&
[
{
EventTypes.Message,
EventTypes.Sticker,
EventTypes.Encrypted,
].contains(nextEvent!.type) &&
}.contains(nextEvent!.type) &&
nextEvent?.relationshipType == null &&
nextEvent!.senderId == event.senderId &&
!displayTime;
Expand Down Expand Up @@ -407,13 +407,11 @@ class Message extends StatelessWidget {
: Theme.of(context).primaryColor.withAlpha(0),
constraints:
const BoxConstraints(maxWidth: FluffyThemes.columnWidth * 2.5),
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: 8.0,
vertical: 4.0 * AppConfig.bubbleSizeFactor,
),
child: container,
padding: EdgeInsets.symmetric(
horizontal: 8.0,
vertical: 4.0 * AppConfig.bubbleSizeFactor,
),
child: container,
),
),
);
Expand Down
Loading