Added quick forward
This commit is contained in:
parent
31c5dc8b7d
commit
e07faa0c8a
@ -1047,7 +1047,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
.controller('AppImHistoryController', function ($scope, $location, $timeout, $modal, $rootScope, MtpApiManager, AppUsersManager, AppChatsManager, AppMessagesManager, AppPeersManager, ApiUpdatesManager, PeersSelectService, IdleManager, StatusManager, NotificationsManager, ErrorService, GeoLocationManager) {
|
.controller('AppImHistoryController', function ($scope, $location, $timeout, $modal, $rootScope, toaster, _, MtpApiManager, AppUsersManager, AppChatsManager, AppMessagesManager, AppPeersManager, ApiUpdatesManager, PeersSelectService, IdleManager, StatusManager, NotificationsManager, ErrorService, GeoLocationManager) {
|
||||||
|
|
||||||
$scope.$watchCollection('curDialog', applyDialogSelect);
|
$scope.$watchCollection('curDialog', applyDialogSelect);
|
||||||
|
|
||||||
@ -1581,7 +1581,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
|||||||
if ($scope.historyState.canReply) {
|
if ($scope.historyState.canReply) {
|
||||||
selectedReply(messageID);
|
selectedReply(messageID);
|
||||||
} else {
|
} else {
|
||||||
selectedForward(messageID);
|
quickForward(messageID);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1720,6 +1720,31 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function quickForward(msgID) {
|
||||||
|
PeersSelectService.selectPeers({
|
||||||
|
canSend: true,
|
||||||
|
confirm_type: 'FORWARD_PEER'
|
||||||
|
}).then(function (peerStrings) {
|
||||||
|
angular.forEach(peerStrings, function (peerString) {
|
||||||
|
var peerID = AppPeersManager.getPeerID(peerString);
|
||||||
|
AppMessagesManager.forwardMessages(peerID, [msgID]);
|
||||||
|
});
|
||||||
|
var toastData = toaster.pop({
|
||||||
|
type: 'info',
|
||||||
|
body: _('confirm_modal_forward_to_peer_success'),
|
||||||
|
bodyOutputType: 'trustedHtml',
|
||||||
|
clickHandler: function () {
|
||||||
|
$rootScope.$broadcast('history_focus', {
|
||||||
|
peerString: peerStrings[0]
|
||||||
|
});
|
||||||
|
toaster.clear(toastData);
|
||||||
|
},
|
||||||
|
showCloseButton: false
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function selectedForward (selectedMessageID) {
|
function selectedForward (selectedMessageID) {
|
||||||
var selectedMessageIDs = [];
|
var selectedMessageIDs = [];
|
||||||
if (selectedMessageID) {
|
if (selectedMessageID) {
|
||||||
|
@ -217,6 +217,7 @@
|
|||||||
"confirm_modal_contacts_import": "Telegram will now sync your contacts in order to find your friends.",
|
"confirm_modal_contacts_import": "Telegram will now sync your contacts in order to find your friends.",
|
||||||
"confirm_modal_login_phone_correct": "Is this phone number correct?",
|
"confirm_modal_login_phone_correct": "Is this phone number correct?",
|
||||||
"confirm_modal_forward_to_peer": "Forward to {peer}?",
|
"confirm_modal_forward_to_peer": "Forward to {peer}?",
|
||||||
|
"confirm_modal_forward_to_peer_success": "Message was successfully forwarded.",
|
||||||
"confirm_modal_send_to_peer": "Send to {peer}?",
|
"confirm_modal_send_to_peer": "Send to {peer}?",
|
||||||
"confirm_modal_share_file_peer": "Share with {peer}?",
|
"confirm_modal_share_file_peer": "Share with {peer}?",
|
||||||
"confirm_modal_invite_peer": "Invite to {peer}?",
|
"confirm_modal_invite_peer": "Invite to {peer}?",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user