mirror of
https://github.com/nextcloud/ocsms.git
synced 2026-08-22 13:53:00 +00:00
Properly apply contactName & messageCount at conversation loading if reloading tab
This commit is contained in:
+11
-9
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user