prose-im / prose-app-macos

Prose macOS application. XMPP client for team messaging.
https://prose.org/downloads
Mozilla Public License 2.0
58 stars 3 forks source link

chore: Fix warning (non-optional value compared to `nil`) #130

Closed RemiBardon closed 1 year ago

RemiBardon commented 1 year ago

While building the app, I got:

Comparing non-optional value of type 'ConversationInfoReducer.State' (aka 'ChatSessionState<ConversationInfoReducer.ConversationInfoState>') to 'nil' always returns false

Now that info is initialized when the state is created, I don't think this code is necessary at all anymore. It may be useful when switching between conversations, we must try this before merging (hence the Draft status). I couldn't try locally because of #129, so can one of you confirm it doesn't break anything?

RemiBardon commented 1 year ago

@nesium I hear you whispering me I should add a test for it, I'll add one 😉

RemiBardon commented 1 year ago

I added a UI test which confirmed changing the conversation changes the info pane.

RemiBardon commented 1 year ago

You're welcome! I need to get used to it 😌