-
Notifications
You must be signed in to change notification settings - Fork 309
channel_list: All channels screen #832
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
base: main
Are you sure you want to change the base?
Changes from all commits
be92ef5
33924e6
18bb12a
f51e828
96836fc
cc676ac
793e9bf
f604530
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -396,6 +396,24 @@ | |
"@topicValidationErrorMandatoryButEmpty": { | ||
"description": "Topic validation error when topic is required but was empty." | ||
}, | ||
"subscribedToNChannels": "Subscribed to {num, plural, =0{no channels} =1{1 channel} other{{num} channels}}", | ||
"@subscribedToNChannels": { | ||
"description": "Test page label showing number of channels user is subscribed to.", | ||
"placeholders": { | ||
"num": {"type": "int", "example": "4"} | ||
} | ||
}, | ||
"browseNMoreChannels": "Browse {num, plural, =1{1 more channel} other{{num} more channels}}", | ||
"@browseNMoreChannels": { | ||
"description": "Label showing the number of other channels that user can subscribe to", | ||
Khader-1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"placeholders": { | ||
"num": {"type": "int", "example": "4"} | ||
} | ||
}, | ||
"browseAllChannels": "Browse all channels", | ||
"@browseAllChannels": { | ||
"description": "Label for the option to show all channels, this is only shown if user is already subscribed to all visible channels" | ||
}, | ||
"errorInvalidResponse": "The server sent an invalid response", | ||
"@errorInvalidResponse": { | ||
"description": "Error message when an API call returned an invalid response." | ||
|
@@ -532,6 +550,14 @@ | |
"@starredMessagesPageTitle": { | ||
"description": "Title for the page of starred messages." | ||
}, | ||
"channelListPageTitle": "All channels", | ||
"@channelListPageTitle": { | ||
"description": "Title for the page of all channels." | ||
}, | ||
"noChannelsFound": "There are no channels you can view in this organization.", | ||
"@noChannelsFound": { | ||
"description": "Message when no channels are found" | ||
}, | ||
"notifGroupDmConversationLabel": "{senderFullName} to you and {numOthers, plural, =1{1 other} other{{numOthers} others}}", | ||
"@notifGroupDmConversationLabel": { | ||
"description": "Label for a group DM conversation notification.", | ||
|
@@ -586,5 +612,25 @@ | |
"errorNotificationOpenAccountMissing": "The account associated with this notification no longer exists.", | ||
"@errorNotificationOpenAccountMissing": { | ||
"description": "Error message when the account associated with the notification is not found" | ||
}, | ||
"messageSubscribedToChannel": "You've just subscribed to ", | ||
"@messageSubscribedToChannel": { | ||
"description": "A message shown to inform user that subscription is successful" | ||
}, | ||
"messageAlreadySubscribedToChannel": "You're already subscribed to ", | ||
"@messageAlreadySubscribedToChannel": { | ||
"description": "A message shown to inform user that subscription is already made" | ||
}, | ||
"errorFailedToSubscribeToChannel": "Failed to subscribe to ", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's use placeholders for these strings. |
||
"@errorFailedToSubscribeToChannel": { | ||
"description": "An error message when subscribe action fails" | ||
}, | ||
"messageUnsubscribedFromChannel": "You've unsubscribed from ", | ||
"@messageUnsubscribedFromChannel": { | ||
"description": "A message shown to inform user that unsubscribe action passes" | ||
}, | ||
"errorFailedToUnsubscribeFromChannel": "Failed to unsubscribe to ", | ||
"@errorFailedToUnsubscribeFromChannel": { | ||
"description": "An error message when unsubscribe action fails" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -304,6 +304,15 @@ class ChannelStoreImpl with ChannelStore { | |
|
||
case SubscriptionRemoveEvent(): | ||
for (final streamId in event.streamIds) { | ||
final subscription = streams[streamId]; | ||
if (subscription == null || subscription is! Subscription) { // TODO(log) | ||
continue; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like this is only possible when the server behaves unexpectedly. So it might fit better in a non-nfc commit explaining how this can happen. |
||
} | ||
assert(streamsByName[subscription.name] is Subscription); | ||
assert(subscriptions.containsKey(streamId)); | ||
final unsubscribedStream = subscription.toStream(); | ||
streams[streamId] = unsubscribedStream; | ||
streamsByName[subscription.name] = unsubscribedStream; | ||
subscriptions.remove(streamId); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to have a link to the discussion on the design here, so that we know this UI is based on the legacy mobile app.