Fixed no message photo modal

This commit is contained in:
Igor Zhukov 2014-04-09 23:01:32 +02:00
parent 950ecd0d1d
commit b6aea55826
3 changed files with 10 additions and 2 deletions

View File

@ -871,6 +871,13 @@ angular.module('myApp.controllers', [])
$scope.photo = AppPhotosManager.wrapForFull($scope.photoID);
$scope.nav = {};
if (!$scope.messageID) {
$scope.nav.next = function () {
$modalInstance.close();
}
return;
}
var peerID = AppMessagesManager.getMessagePeer(AppMessagesManager.getMessage($scope.messageID)),
inputPeer = AppPeersManager.getInputPeerByID(peerID),
inputQuery = '',
@ -996,6 +1003,7 @@ angular.module('myApp.controllers', [])
$scope.progress = {enabled: false};
$scope.player = {};
$scope.forward = function () {
var messageID = $scope.messageID;
PeersSelectService.selectPeer().then(function (peerString) {

View File

@ -4,7 +4,7 @@
<div class="photo_modal_image_wrap" my-load-full-photo full-photo="photo.full" thumb-location="photo.thumb.location" ng-click="nav.next()"> </div>
<div class="media_modal_actions pull-right">
<div class="media_modal_actions pull-right" ng-if="messageID">
<a href="" class="media_modal_action_link" ng-click="forward()">Forward</a>
<a href="" class="media_modal_action_link" ng-click="delete()">Delete</a>
</div>

View File

@ -4,7 +4,7 @@
<div class="video_modal_image_wrap" my-load-video video="video"></div>
<div class="media_modal_actions pull-right">
<div class="media_modal_actions pull-right" ng-if="messageID">
<a href="" class="media_modal_action_link" ng-click="forward()">Forward</a>
<a href="" class="media_modal_action_link" ng-click="delete()">Delete</a>
</div>