Fix window size on first launch + show phone number in conversation list - #249
Open
fiveclankers wants to merge 2 commits into
Open
Fix window size on first launch + show phone number in conversation list#249fiveclankers wants to merge 2 commits into
fiveclankers wants to merge 2 commits into
Conversation
The window had no default size set so it'd launch tiny on a fresh install and you'd have to manually resize it every time. Added an AppWindow.Resize call inside EnsureWindowIsInitialized() which only runs when the window content hasn't been set yet (i.e. first launch). Went with 1100x700 which feels like a reasonable starting point for the layout.
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.
Fixes #248
The conversation list was only showing the contact name (or falling back to the raw number if no name existed), but there was no way to see both at the same time. So if you had a contact saved you'd see their name but have no idea which number it actually was.
Wrapped the DisplayName TextBlock in a StackPanel and added a smaller subtitle TextBlock underneath that binds to SubtitleAddress (which is already on the Conversation model - it just pulls PrimaryContact.Address). Used the existing EmptyObjectToVisibilityConverter to hide the subtitle row when there's no address so it doesn't break group chats or anything weird.
Pretty much the same pattern that ContactSearchSuggestionTemplate was already doing, just applied it to the list items too.
Also fixes #243
The window had no default size set so on a fresh install it'd open tiny and you'd have to drag-resize it manually every time. Added AppWindow.Resize(1100x700) inside EnsureWindowIsInitialized() which only runs when the window content hasn't been set yet, so it won't override your size on subsequent launches.