|
|
@ -1846,6 +1846,7 @@ angular.module('myApp.controllers', ['myApp.i18n']) |
|
|
|
|
|
|
|
|
|
|
|
$scope.user = AppUsersManager.getUser($scope.userID); |
|
|
|
$scope.user = AppUsersManager.getUser($scope.userID); |
|
|
|
$scope.userPhoto = AppUsersManager.getUserPhoto($scope.userID, 'User'); |
|
|
|
$scope.userPhoto = AppUsersManager.getUserPhoto($scope.userID, 'User'); |
|
|
|
|
|
|
|
$scope.blocked = false; |
|
|
|
|
|
|
|
|
|
|
|
$scope.settings = {notifications: true}; |
|
|
|
$scope.settings = {notifications: true}; |
|
|
|
|
|
|
|
|
|
|
@ -1862,6 +1863,7 @@ angular.module('myApp.controllers', ['myApp.i18n']) |
|
|
|
if (userFullResult.profile_photo._ != 'photoEmpty') { |
|
|
|
if (userFullResult.profile_photo._ != 'photoEmpty') { |
|
|
|
$scope.userPhoto.id = userFullResult.profile_photo.id; |
|
|
|
$scope.userPhoto.id = userFullResult.profile_photo.id; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$scope.blocked = userFullResult.blocked; |
|
|
|
|
|
|
|
|
|
|
|
NotificationsManager.savePeerSettings($scope.userID, userFullResult.notify_settings); |
|
|
|
NotificationsManager.savePeerSettings($scope.userID, userFullResult.notify_settings); |
|
|
|
NotificationsManager.getPeerMuted($scope.userID).then(function (muted) { |
|
|
|
NotificationsManager.getPeerMuted($scope.userID).then(function (muted) { |
|
|
@ -1922,6 +1924,14 @@ angular.module('myApp.controllers', ['myApp.i18n']) |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.toggleBlock = function (block) { |
|
|
|
|
|
|
|
MtpApiManager.invokeApi(block ? 'contacts.block' : 'contacts.unblock', { |
|
|
|
|
|
|
|
id: AppUsersManager.getUserInput($scope.userID) |
|
|
|
|
|
|
|
}).then(function () { |
|
|
|
|
|
|
|
$scope.blocked = block; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
$scope.shareContact = function () { |
|
|
|
$scope.shareContact = function () { |
|
|
|
PeersSelectService.selectPeer({confirm_type: 'SHARE_CONTACT_PEER'}).then(function (peerString) { |
|
|
|
PeersSelectService.selectPeer({confirm_type: 'SHARE_CONTACT_PEER'}).then(function (peerString) { |
|
|
|
var peerID = AppPeersManager.getPeerID(peerString); |
|
|
|
var peerID = AppPeersManager.getPeerID(peerString); |
|
|
|