Browse Source

Filter for round video messages (#1445)

Fixes #1440

Signed-off-by: Viktor Oreshkin <imselfish@stek29.rocks>
master
Viktor Oreshkin 8 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'])
photos: 'inputMessagesFilterPhotos', photos: 'inputMessagesFilterPhotos',
video: 'inputMessagesFilterVideo', video: 'inputMessagesFilterVideo',
documents: 'inputMessagesFilterDocument', documents: 'inputMessagesFilterDocument',
audio: 'inputMessagesFilterVoice' audio: 'inputMessagesFilterVoice',
round: 'inputMessagesFilterRoundVideo',
} }
var jump = 0 var jump = 0
var moreJump = 0 var moreJump = 0

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

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

5
app/js/messages_manager.js

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

1
app/partials/desktop/head.html

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

1
app/partials/mobile/head.html

@ -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('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('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('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> </ul>
</div> </div>

Loading…
Cancel
Save