Merge branch 'pr/117'

Conflicts:
	app/css/app.css
This commit is contained in:
Igor Zhukov 2014-03-12 23:31:58 +01:00
commit c416dedb91
3 changed files with 14 additions and 1 deletions

View File

@ -818,6 +818,14 @@ a.im_dialog:hover .im_dialog_date {
-webkit-user-select: text;
}
.im_history_empty {
padding: 100px 50px 0;
text-align: center;
color: #999;
font-size: 1.5em;
}
.im_history_to_bottom {
position: relative;
}
@ -2510,4 +2518,3 @@ ce671b orange
.user_color_7:hover {color: #2996ad;}
.user_color_8,
.user_color_8:hover {color: #ce671b;}

View File

@ -337,6 +337,7 @@ angular.module('myApp.controllers', [])
StatusManager.start();
$scope.history = [];
$scope.historyEmpty = false;
$scope.mediaType = false;
$scope.selectedMsgs = {};
$scope.selectedCount = 0;
@ -449,10 +450,14 @@ angular.module('myApp.controllers', [])
? AppMessagesManager.getSearch($scope.curDialog.inputPeer, '', inputMediaFilter, maxID, startLimit)
: AppMessagesManager.getHistory($scope.curDialog.inputPeer, maxID);
$scope.historyEmpty = false;
getMessagesPromise.then(function (historyResult) {
if (curJump != jump) return;
offset += historyResult.history.length;
$scope.historyEmpty = !historyResult.count;
hasMore = offset < historyResult.count;
maxID = historyResult.history[historyResult.history.length - 1];

View File

@ -87,6 +87,7 @@
<div class="im_history_scrollable">
<div class="im_history" ng-class="{im_history_selectable: selectActions}">
<div class="im_history_empty" ng-show="historyEmpty &amp;&amp; !history.length">No messages to display</div>
<div class="im_history_message_wrap" my-message ng-repeat="historyMessage in history"></div>
</div>