mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-08 16:36:25 +00:00
Reinit message list before showing it to screen, else it merge :)
This commit is contained in:
parent
d075e7f58a
commit
1263af850b
@ -66,7 +66,10 @@ app.controller('OcSmsController', ['$scope', '$interval', '$timeout', '$compile'
|
|||||||
phoneNumberLabel = phoneNumberList.toString();
|
phoneNumberLabel = phoneNumberList.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reinit messages before showing conversation
|
||||||
|
$scope.messages = [];
|
||||||
$scope.formatConversation(jsondata);
|
$scope.formatConversation(jsondata);
|
||||||
|
|
||||||
if (typeof jsondata['contactName'] == 'undefined' || jsondata['contactName'] == '') {
|
if (typeof jsondata['contactName'] == 'undefined' || jsondata['contactName'] == '') {
|
||||||
$('#ocsms-phone-label').html(phoneNumberLabel);
|
$('#ocsms-phone-label').html(phoneNumberLabel);
|
||||||
g_curContactName = phoneNumberLabel;
|
g_curContactName = phoneNumberLabel;
|
||||||
@ -242,6 +245,7 @@ app.controller('OcSmsController', ['$scope', '$interval', '$timeout', '$compile'
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
$scope.removeConversationMessage = function (msg) {
|
$scope.removeConversationMessage = function (msg) {
|
||||||
|
alert('test');
|
||||||
var len = $scope.messages.length;
|
var len = $scope.messages.length;
|
||||||
for (var i=0; i < len; i++) {
|
for (var i=0; i < len; i++) {
|
||||||
var curMsg = $scope.messages[i];
|
var curMsg = $scope.messages[i];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user