Repository navigation
feat(chat): label a chat with no messages "Nothing yet" - #1518
Merged
Merged
Conversation
A chat created but never spoken in left the row's subtitle blank, which reads as a preview that failed to load rather than as an empty chat. It now renders an italic "Nothing yet" where the preview goes. The placeholder is keyed on the chat having no last message, not on the preview coming back null. Media and system messages both preview as null today, so keying on the preview would call a chat full of photos empty; those rows keep the blank line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A chat created but never spoken in left the row's subtitle blank, so it read as a preview that failed to load rather than as an empty chat. The row now renders an italic "Nothing yet" where the preview goes, in the same secondary colour, so it keeps its height against its neighbours.
The placeholder is keyed on the chat having no last message (
hasMessages, mapped frommetadata.lastMessage != null), not onlastMessagePreviewcoming back null. Those are not the same thing: media and system messages both preview as null today, per theTODOinChatSummaryMapping, so keying on the preview would tell you a chat full of photos has nothing in it. Those rows keep the blank line.It is not group-only either.
hasMessagesdefaults totrue, so the contact rows that pass their own fallback (a phone number, a "joined" line) are untouched, but a DM with no messages gets the same placeholder, since a blank line is no more useful there.ChatRowSubtitlegains the new rung between the preview and the caller's fallback, which keeps the whole ladder in one place;SubtitleTextgains afontStyleto carry the italic.Two cases added to
ChatSummaryPreviewTest: an empty group reportshasMessages = false, and a group whose newest message is media still reportstrue.TipChatRowScreenshotTestrenders the empty row next to a normal one atbuild/screenshots/tip_chat_row_empty.png.