Browse Source

Filter for round video messages (#1445)

Fixes #1440

Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
master
Viktor Oreshkin 7 years ago committed by Igor Zhukov
parent
commit
a5b165ff50
  1. 3
      app/js/controllers.js
  2. 1
      app/js/locales/en-us.json
  3. 5
      app/js/messages_manager.js
  4. 1
      app/partials/desktop/head.html
  5. 1
      app/partials/mobile/head.html

3
app/js/controllers.js

@ -1229,7 +1229,8 @@ angular.module('myApp.controllers', ['myApp.i18n']) @@ -1229,7 +1229,8 @@ angular.module('myApp.controllers', ['myApp.i18n'])
photos: 'inputMessagesFilterPhotos',
video: 'inputMessagesFilterVideo',
documents: 'inputMessagesFilterDocument',
audio: 'inputMessagesFilterVoice'
audio: 'inputMessagesFilterVoice',
round: 'inputMessagesFilterRoundVideo',
}
var jump = 0
var moreJump = 0

1
app/js/locales/en-us.json

@ -456,6 +456,7 @@ @@ -456,6 +456,7 @@
"head_media_video": "Videos",
"head_media_documents": "Files",
"head_media_audio": "Voice messages",
"head_media_round": "Video messages",
"head_media_search": "Search",
"head_about": "About",
"head_clear_all": "Clear history",

5
app/js/messages_manager.js

@ -803,6 +803,11 @@ angular.module('myApp.services') @@ -803,6 +803,11 @@ angular.module('myApp.services')
neededDocType = 'voice'
break
case 'inputMessagesFilterRoundVideo':
neededContents['messageMediaDocument'] = true
neededDocType = 'round'
break
default:
return $q.when({
count: 0,

1
app/partials/desktop/head.html

@ -53,6 +53,7 @@ @@ -53,6 +53,7 @@
<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('audio')" my-i18n="head_media_audio"></a></li>
<li><a ng-click="toggleMedia('round')" my-i18n="head_media_round"></a></li>
</ul>
</div>

1
app/partials/mobile/head.html

@ -25,6 +25,7 @@ @@ -25,6 +25,7 @@
<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('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>
</ul>
</div>

Loading…
Cancel
Save