Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
bffaeed
api: Add InitialSnapshot.maxChannelNameLength
sm-sayedi Oct 29, 2025
6e7d85b
realm: Add RealmStore.maxChannelNameLength
sm-sayedi Oct 29, 2025
975098c
api: Add ZulipStream.isRecentlyActive
sm-sayedi Oct 6, 2025
b869d89
api: Update ChannelDeleteEvent to match new API changes
sm-sayedi Oct 9, 2025
1652cb4
autocomplete: Call EmojiAutocompleteView.reassemble where needed
sm-sayedi Nov 10, 2025
999dc43
emoji: Add EmojiAutocompleteView.dispose
sm-sayedi Nov 10, 2025
c376265
autocomplete [nfc]: Introduce `AutocompleteViewManager._autocompleteV…
sm-sayedi Oct 24, 2025
d502d93
store: Call AutocompleteViewManager.handleUserGroupRemove/UpdateEvent
sm-sayedi Oct 9, 2025
43bea01
autocomplete [nfc]: Move _matchName up to AutocompleteQuery
sm-sayedi Oct 7, 2025
af6fd7a
autocomplete: Add view-model ChannelLinkAutocompleteView
sm-sayedi Oct 8, 2025
63a42b7
autocomplete test [nfc]: Use MarkedTextParse as the return type of pa…
sm-sayedi Oct 20, 2025
5547832
compose: Introduce PerAccountStore in ComposeController
sm-sayedi Oct 29, 2025
b74dadc
autocomplete: Identify when the user intends a channel link autocomplete
sm-sayedi Oct 8, 2025
ba5e3f8
autocomplete [nfc]: Add a TODO(#1967) for ignoring starting "**" afte…
sm-sayedi Nov 3, 2025
5d8526e
autocomplete test: Make setupToComposeInput accept `channels` param
sm-sayedi Oct 21, 2025
4b0b45d
internal_link [nfc]: Factor out constructing fragment in its own method
sm-sayedi Sep 24, 2025
904190f
compose: Introduce `fallbackMarkdownLink` function
sm-sayedi Nov 3, 2025
accc796
channel: Finish channel link autocomplete for compose box
sm-sayedi Nov 3, 2025
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
18 changes: 16 additions & 2 deletions lib/api/model/events.dart
Original file line number Diff line number Diff line change
Expand Up @@ -616,9 +616,21 @@ class ChannelDeleteEvent extends ChannelEvent {
@JsonKey(includeToJson: true)
String get op => 'delete';

final List<ZulipStream> streams;
@JsonKey(name: 'stream_ids', readValue: _readChannelIds)
final List<int> channelIds;

// TODO(server-10) simplify away; rely on stream_ids
Copy link
Collaborator

Choose a reason for hiding this comment

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

api: Update ChannelDeleteEvent to match new API changes

Let's link to #api design > stream deletion events @ 💬 in the commit message.

(Also a nit: the symptom is described in that discussion; it's noticeable but it's not as bad as crashing the app.)

static List<int> _readChannelIds(Map<dynamic, dynamic> json, String key) {
final channelIds = json['stream_ids'] as List<dynamic>?;
if (channelIds != null) return channelIds.map((id) => id as int).toList();

final channels = json['streams'] as List<dynamic>;
return channels
.map((c) => (c as Map<String, dynamic>)['stream_id'] as int)
.toList();
}

ChannelDeleteEvent({required super.id, required this.streams});
ChannelDeleteEvent({required super.id, required this.channelIds});

factory ChannelDeleteEvent.fromJson(Map<String, dynamic> json) =>
_$ChannelDeleteEventFromJson(json);
Expand Down Expand Up @@ -691,6 +703,8 @@ class ChannelUpdateEvent extends ChannelEvent {
case ChannelPropertyName.canSendMessageGroup:
case ChannelPropertyName.canSubscribeGroup:
return GroupSettingValue.fromJson(value);
case ChannelPropertyName.isRecentlyActive:
return value as bool;
case ChannelPropertyName.streamWeeklyTraffic:
return value as int?;
case null:
Expand Down
11 changes: 7 additions & 4 deletions lib/api/model/events.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions lib/api/model/initial_snapshot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class InitialSnapshot {

final List<CustomProfileField> customProfileFields;

@JsonKey(name: 'max_stream_name_length')
final int maxChannelNameLength;
final int maxTopicLength;

final int serverPresencePingIntervalSeconds;
Expand Down Expand Up @@ -160,6 +162,7 @@ class InitialSnapshot {
required this.zulipMergeBase,
required this.alertWords,
required this.customProfileFields,
required this.maxChannelNameLength,
required this.maxTopicLength,
required this.serverPresencePingIntervalSeconds,
required this.serverPresenceOfflineThresholdSeconds,
Expand Down
2 changes: 2 additions & 0 deletions lib/api/model/initial_snapshot.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions lib/api/model/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ class ZulipStream {
GroupSettingValue? canSendMessageGroup; // TODO(server-10)
GroupSettingValue? canSubscribeGroup; // TODO(server-10)

bool? isRecentlyActive; // TODO(server-10)
// TODO(server-8): added in FL 199, was previously only on [Subscription] objects
int? streamWeeklyTraffic;

Expand All @@ -691,6 +692,7 @@ class ZulipStream {
required this.canDeleteOwnMessageGroup,
required this.canSendMessageGroup,
required this.canSubscribeGroup,
required this.isRecentlyActive,
required this.streamWeeklyTraffic,
});

Expand All @@ -715,6 +717,7 @@ class ZulipStream {
canDeleteOwnMessageGroup: subscription.canDeleteOwnMessageGroup,
canSendMessageGroup: subscription.canSendMessageGroup,
canSubscribeGroup: subscription.canSubscribeGroup,
isRecentlyActive: subscription.isRecentlyActive,
streamWeeklyTraffic: subscription.streamWeeklyTraffic,
);
}
Expand Down Expand Up @@ -752,6 +755,7 @@ enum ChannelPropertyName {
canDeleteOwnMessageGroup,
canSendMessageGroup,
canSubscribeGroup,
isRecentlyActive,
streamWeeklyTraffic;

/// Get a [ChannelPropertyName] from a raw, snake-case string we recognize, else null.
Expand Down Expand Up @@ -837,6 +841,7 @@ class Subscription extends ZulipStream {
required super.canDeleteOwnMessageGroup,
required super.canSendMessageGroup,
required super.canSubscribeGroup,
required super.isRecentlyActive,
required super.streamWeeklyTraffic,
required this.desktopNotifications,
required this.emailNotifications,
Expand Down
5 changes: 5 additions & 0 deletions lib/api/model/model.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading