Commit 4b0935f7 authored by Anthony Léonard's avatar Anthony Léonard Committed by Kateryna Kostiuk

fix in-call chat view

Chat view for text messaging during call wasn't working at all due to
multiple problems that are now fixed:
 - Conversation model in chat view wasn't set at all when call is set.
 - NSTableView is used instead of previous NSOutlineView like what is
   done in off-call conversation view.
 - Chat button is now displayed during call.

Moreover, sendMessage: in ConversationVC was getting the conversation
UID in a not-very-clever way. It is also fixed.

Change-Id: Iac406a62541abeed9817209e76082c74030162e6
parent 9bebf1df
......@@ -165,11 +165,10 @@
- (IBAction)sendMessage:(id)sender
{
auto* conv = [self getCurrentConversation];
/* make sure there is text to send */
NSString* text = self.message;
if (text && text.length > 0) {
convModel_->sendMessage(conv->uid, std::string([text UTF8String]));
convModel_->sendMessage(convUid_, std::string([text UTF8String]));
self.message = @"";
[messagesViewVC newMessageSent];
}
......
......@@ -148,6 +148,7 @@
callUid_ = callUid;
convUid_ = convUid;
accountInfo_ = account;
[self.chatVC setConversationUid:convUid model:account->conversationModel.get()];
}
- (void)awakeFromNib
......@@ -204,6 +205,7 @@
[outgoingPanel setHidden:YES];
[controlsPanel setHidden:NO];
[headerContainer setHidden:NO];
[chatButton setHidden:NO];
using Status = lrc::api::call::Status;
switch (currentCall.status) {
......
......@@ -682,7 +682,7 @@
<rect key="frame" x="0.0" y="0.0" width="372" height="465"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" selectionHighlightStyle="none" autosaveColumns="NO" rowHeight="60" rowSizeStyle="automatic" viewBased="YES" indentationPerLevel="16" outlineTableColumn="nFu-qN-GHK" id="ZOj-5b-rnp">
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" selectionHighlightStyle="none" autosaveColumns="NO" rowHeight="60" rowSizeStyle="automatic" viewBased="YES" id="ZOj-5b-rnp">
<rect key="frame" x="0.0" y="0.0" width="372" height="465"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>
......@@ -786,9 +786,10 @@
</tableColumn>
</tableColumns>
<connections>
<outlet property="dataSource" destination="loh-bZ-dDU" id="G8m-dx-6OM"/>
<outlet property="delegate" destination="loh-bZ-dDU" id="TuS-js-CeK"/>
</connections>
</outlineView>
</tableView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="zPy-Iz-oF9">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment