mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-07 16:06:15 +00:00
Properly apply contactName & messageCount at conversation loading if reloading tab
This commit is contained in:
parent
852c0835fa
commit
a512ee4957
@ -157,16 +157,18 @@ app.controller('OcSmsController', ['$scope', '$interval', '$timeout', '$compile'
|
|||||||
// Reinit messages before showing conversation
|
// Reinit messages before showing conversation
|
||||||
$scope.formatConversation(jsondata);
|
$scope.formatConversation(jsondata);
|
||||||
|
|
||||||
if (typeof jsondata['contactName'] == 'undefined' || jsondata['contactName'] == '') {
|
$scope.$apply(function () {
|
||||||
$scope.selectedContact.label = phoneNumberLabel;
|
if (typeof jsondata['contactName'] == 'undefined' || jsondata['contactName'] == '') {
|
||||||
$scope.selectedContact.opt_numbers = "";
|
$scope.selectedContact.label = phoneNumberLabel;
|
||||||
}
|
$scope.selectedContact.opt_numbers = "";
|
||||||
else {
|
}
|
||||||
$scope.selectedContact.label = jsondata['contactName'];
|
else {
|
||||||
$scope.selectedContact.opt_numbers = phoneNumberLabel;
|
$scope.selectedContact.label = jsondata['contactName'];
|
||||||
}
|
$scope.selectedContact.opt_numbers = phoneNumberLabel;
|
||||||
|
}
|
||||||
|
|
||||||
$scope.totalMessageCount = jsondata['msgCount'] !== undefined ? jsondata['msgCount'] : 0;
|
$scope.totalMessageCount = jsondata['msgCount'] !== undefined ? jsondata['msgCount'] : 0;
|
||||||
|
}
|
||||||
|
|
||||||
$('#app-content').scrollTop(1E10);
|
$('#app-content').scrollTop(1E10);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user