Browse Source

Added audio filter

master
Igor Zhukov 11 years ago
parent
commit
07c90744b2
  1. 1
      app/js/controllers.js
  2. 2
      app/js/lib/config.js
  3. 1
      app/js/lib/schema.tl.txt
  4. 4
      app/js/services.js
  5. 2
      app/partials/im.html

1
app/js/controllers.js

@ -480,6 +480,7 @@ angular.module('myApp.controllers', [])
photos: 'inputMessagesFilterPhotos', photos: 'inputMessagesFilterPhotos',
video: 'inputMessagesFilterVideo', video: 'inputMessagesFilterVideo',
documents: 'inputMessagesFilterDocument', documents: 'inputMessagesFilterDocument',
audio: 'inputMessagesFilterAudio'
}, },
jump = 0; jump = 0;

2
app/js/lib/config.js

File diff suppressed because one or more lines are too long

1
app/js/lib/schema.tl.txt

@ -224,6 +224,7 @@ inputMessagesFilterPhotos#9609a51c = MessagesFilter;
inputMessagesFilterVideo#9fc00e65 = MessagesFilter; inputMessagesFilterVideo#9fc00e65 = MessagesFilter;
inputMessagesFilterPhotoVideo#56e9f0e4 = MessagesFilter; inputMessagesFilterPhotoVideo#56e9f0e4 = MessagesFilter;
inputMessagesFilterDocument#9eddf188 = MessagesFilter; inputMessagesFilterDocument#9eddf188 = MessagesFilter;
inputMessagesFilterAudio#cfc87522 = MessagesFilter;
updateNewMessage#13abdb3 message:Message pts:int = Update; updateNewMessage#13abdb3 message:Message pts:int = Update;
updateMessageID#4e90bfd6 id:int random_id:long = Update; updateMessageID#4e90bfd6 id:int random_id:long = Update;

4
app/js/services.js

@ -926,6 +926,10 @@ angular.module('myApp.services', [])
case 'inputMessagesFilterDocument': case 'inputMessagesFilterDocument':
neededContents['messageMediaDocument'] = true; neededContents['messageMediaDocument'] = true;
break; break;
case 'inputMessagesFilterAudio':
neededContents['messageMediaAudio'] = true;
break;
} }
for (i = 0; i < historyStorage.history.length; i++) { for (i = 0; i < historyStorage.history.length; i++) {
message = messagesStorage[historyStorage.history[i]]; message = messagesStorage[historyStorage.history[i]];

2
app/partials/im.html

@ -83,6 +83,7 @@
<li><a ng-click="toggleMedia('photos')">Photos</a></li> <li><a ng-click="toggleMedia('photos')">Photos</a></li>
<li><a ng-click="toggleMedia('video')">Videos</a></li> <li><a ng-click="toggleMedia('video')">Videos</a></li>
<li><a ng-click="toggleMedia('documents')">Documents</a></li> <li><a ng-click="toggleMedia('documents')">Documents</a></li>
<li><a ng-click="toggleMedia('audio')">Voice messages</a></li>
</ul> </ul>
</div> </div>
<a ng-show="mediaType !== false" class="im_history_panel_return_link pull-right" ng-click="toggleMedia()"> <a ng-show="mediaType !== false" class="im_history_panel_return_link pull-right" ng-click="toggleMedia()">
@ -94,6 +95,7 @@
<h4 ng-switch-when="photos">Photos</h4> <h4 ng-switch-when="photos">Photos</h4>
<h4 ng-switch-when="video">Videos</h4> <h4 ng-switch-when="video">Videos</h4>
<h4 ng-switch-when="documents">Documents</h4> <h4 ng-switch-when="documents">Documents</h4>
<h4 ng-switch-when="audio">Voice messages</h4>
<h4 ng-switch-default ng-switch="historyPeer.id > 0" ng-click="showPeerInfo()"> <h4 ng-switch-default ng-switch="historyPeer.id > 0" ng-click="showPeerInfo()">
<div ng-switch-when="true"> <div ng-switch-when="true">

Loading…
Cancel
Save