New items in shared media
Audio, Shared Links, Replies and mentions Click on date in shared media now jumps to message in context Closes #1554 Closes #975
This commit is contained in:
parent
77630dcf5c
commit
d2cbfea664
@ -1254,6 +1254,9 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
documents: 'inputMessagesFilterDocument',
|
||||
audio: 'inputMessagesFilterVoice',
|
||||
round: 'inputMessagesFilterRoundVideo',
|
||||
music: 'inputMessagesFilterMusic',
|
||||
urls: 'inputMessagesFilterUrl',
|
||||
mentions: 'inputMessagesFilterMyMentions'
|
||||
}
|
||||
var jump = 0
|
||||
var moreJump = 0
|
||||
@ -1693,6 +1696,13 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
}
|
||||
if (target.className &&
|
||||
target.className.indexOf('im_message_date') != -1) {
|
||||
if ($scope.historyFilter.mediaType) {
|
||||
$rootScope.$broadcast('history_focus', {
|
||||
peerString: $scope.curDialog.peer,
|
||||
messageID: messageID
|
||||
})
|
||||
return
|
||||
}
|
||||
if (AppPeersManager.isBroadcast(peerID)) {
|
||||
quickForward(messageID)
|
||||
} else {
|
||||
@ -1955,7 +1965,9 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
return
|
||||
}
|
||||
$scope.historyFilter.mediaType = mediaType || false
|
||||
$scope.curDialog.messageID = false
|
||||
if (mediaType) {
|
||||
$scope.curDialog.messageID = false
|
||||
}
|
||||
peerHistory.messages = []
|
||||
peerHistory.ids = []
|
||||
$scope.state.empty = true
|
||||
|
@ -385,7 +385,7 @@
|
||||
"message_service_payment_sent": "Payment sent",
|
||||
|
||||
"message_admin_badge": "admin",
|
||||
|
||||
|
||||
"message_action_reply": "Reply",
|
||||
"message_action_edit": "Edit",
|
||||
"message_action_delete": "Delete",
|
||||
@ -461,8 +461,11 @@
|
||||
"head_media_photos": "Photos",
|
||||
"head_media_video": "Videos",
|
||||
"head_media_documents": "Files",
|
||||
"head_media_music": "Audio",
|
||||
"head_media_links": "Shared links",
|
||||
"head_media_audio": "Voice messages",
|
||||
"head_media_round": "Video messages",
|
||||
"head_media_mymentions": "Mentions",
|
||||
"head_media_search": "Search",
|
||||
"head_about": "About",
|
||||
"head_clear_all": "Clear history",
|
||||
@ -501,6 +504,10 @@
|
||||
"im_media_video": "Videos",
|
||||
"im_media_documents": "Files",
|
||||
"im_media_audio": "Voice messages",
|
||||
"im_media_round": "Video messages",
|
||||
"im_media_music": "Audio",
|
||||
"im_media_links": "Shared Links",
|
||||
"im_media_mentions": "Mentions and Replies",
|
||||
"im_pluralize_participants": "{'0': 'No members', 'one': '1 member', 'other': '{} members'}",
|
||||
"im_show_recent_messages": "Show recent messages",
|
||||
"im_show_all_messages": "Show all messages",
|
||||
|
@ -808,6 +808,19 @@ angular.module('myApp.services')
|
||||
neededDocType = 'round'
|
||||
break
|
||||
|
||||
case 'inputMessagesFilterMusic':
|
||||
neededContents['messageMediaDocument'] = true
|
||||
neededDocType = 'audio'
|
||||
break
|
||||
|
||||
case 'inputMessagesFilterUrl':
|
||||
neededContents['url'] = true
|
||||
break
|
||||
|
||||
case 'inputMessagesFilterMyMentions':
|
||||
neededContents['mentioned'] = true
|
||||
break
|
||||
|
||||
default:
|
||||
return $q.when({
|
||||
count: 0,
|
||||
@ -867,7 +880,10 @@ angular.module('myApp.services')
|
||||
min_date: 0,
|
||||
max_date: 0,
|
||||
limit: limit || 20,
|
||||
max_id: AppMessagesIDsManager.getMessageLocalID(maxID) || 0
|
||||
offset_id: AppMessagesIDsManager.getMessageLocalID(maxID) || 0,
|
||||
add_offset: 0,
|
||||
max_id: 0,
|
||||
min_id: 0
|
||||
}, {
|
||||
timeout: 300,
|
||||
noErrorBox: true
|
||||
|
@ -52,8 +52,12 @@
|
||||
<li><a ng-click="toggleMedia('photos')" my-i18n="head_media_photos"></a></li>
|
||||
<li><a ng-click="toggleMedia('video')" my-i18n="head_media_video"></a></li>
|
||||
<li><a ng-click="toggleMedia('documents')" my-i18n="head_media_documents"></a></li>
|
||||
<li><a ng-click="toggleMedia('music')" my-i18n="head_media_music"></a></li>
|
||||
<li><a ng-click="toggleMedia('urls')" my-i18n="head_media_links"></a></li>
|
||||
<li><a ng-click="toggleMedia('audio')" my-i18n="head_media_audio"></a></li>
|
||||
<li><a ng-click="toggleMedia('round')" my-i18n="head_media_round"></a></li>
|
||||
<li class="divider ng-scope"></li>
|
||||
<li><a ng-click="toggleMedia('mentions')" my-i18n="head_media_mymentions"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -80,6 +84,18 @@
|
||||
<div class="tg_head_peer_media" ng-switch-when="audio">
|
||||
<i class="icon icon-filter-audio"></i><span my-i18n="im_media_audio"></span>
|
||||
</div>
|
||||
<div class="tg_head_peer_media" ng-switch-when="round">
|
||||
<i class="icon icon-filter-audio"></i><span my-i18n="im_media_round"></span>
|
||||
</div>
|
||||
<div class="tg_head_peer_media" ng-switch-when="music">
|
||||
<i class="icon icon-filter-documents"></i><span my-i18n="im_media_music"></span>
|
||||
</div>
|
||||
<div class="tg_head_peer_media" ng-switch-when="urls">
|
||||
<span my-i18n="im_media_links"></span>
|
||||
</div>
|
||||
<div class="tg_head_peer_media" ng-switch-when="mentions">
|
||||
<span my-i18n="im_media_mentions"></span>
|
||||
</div>
|
||||
|
||||
<a class="tg_head_btn" ng-switch-default ng-click="showPeerInfo()">
|
||||
<div class="tg_head_peer_info">
|
||||
|
@ -24,8 +24,12 @@
|
||||
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('photos')" my-i18n="head_media_photos"></a></li>
|
||||
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('video')" my-i18n="head_media_video"></a></li>
|
||||
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('documents')" my-i18n="head_media_documents"></a></li>
|
||||
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('music')" my-i18n="head_media_music"></a></li>
|
||||
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('urls')" my-i18n="head_media_links"></a></li>
|
||||
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('audio')" my-i18n="head_media_audio"></a></li>
|
||||
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('round')" my-i18n="head_media_round"></a></li>
|
||||
<li ng-if="!historyFilter.mediaType" class="divider"></li>
|
||||
<li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia('mentions')" my-i18n="head_media_mymentions"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -45,10 +49,14 @@
|
||||
<a ng-click="toggleMedia()" class="navbar-quick-media-back">
|
||||
<i class="icon icon-back"></i>
|
||||
<div class="navbar-quick-back-title" ng-switch="historyFilter.mediaType">
|
||||
<h4 ng-switch-when="photos" my-i18n="head_media_photos"></h4>
|
||||
<h4 ng-switch-when="video" my-i18n="head_media_video"></h4>
|
||||
<h4 ng-switch-when="documents" my-i18n="head_media_documents"></h4>
|
||||
<h4 ng-switch-when="audio" my-i18n="head_media_audio"></h4>
|
||||
<h4 ng-switch-when="photos" my-i18n="im_media_photos"></h4>
|
||||
<h4 ng-switch-when="video" my-i18n="im_media_video"></h4>
|
||||
<h4 ng-switch-when="documents" my-i18n="im_media_documents"></h4>
|
||||
<h4 ng-switch-when="audio" my-i18n="im_media_audio"></h4>
|
||||
<h4 ng-switch-when="round" my-i18n="im_media_round"></h4>
|
||||
<h4 ng-switch-when="music" my-i18n="im_media_music"></h4>
|
||||
<h4 ng-switch-when="urls" my-i18n="im_media_links"></h4>
|
||||
<h4 ng-switch-when="mentions" my-i18n="im_media_mentions"></h4>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user