Browse Source

Improved grouping, passing app version

master
Igor Zhukov 11 years ago
parent
commit
8684ea54fc
  1. 2
      app/js/controllers.js
  2. 2
      app/js/lib/mtproto.js
  3. 10
      gulpfile.js

2
app/js/controllers.js

@ -471,6 +471,8 @@ angular.module('myApp.controllers', []) @@ -471,6 +471,8 @@ angular.module('myApp.controllers', [])
if (prevMessage &&
curMessage.from_id == prevMessage.from_id &&
curMessage.date < prevMessage.date + 30 &&
!prevMessage.action &&
!curMessage.action &&
!prevMessage.fwd_from_id &&
!curMessage.fwd_from_id &&
curMessage.message && curMessage.message.length < 60) {

2
app/js/lib/mtproto.js

@ -1775,7 +1775,7 @@ factory('MtpNetworkerFactory', function (MtpDcConfigurator, MtpMessageIdGenerato @@ -1775,7 +1775,7 @@ factory('MtpNetworkerFactory', function (MtpDcConfigurator, MtpMessageIdGenerato
serializer.storeInt(2496, 'api_id');
serializer.storeString(navigator.userAgent || 'Unknown UserAgent', 'device_model');
serializer.storeString(navigator.platform || 'Unknown Platform', 'system_version');
serializer.storeString('0.1', 'app_version');
serializer.storeString('0.0.21', 'app_version');
serializer.storeString(navigator.language || 'en', 'lang_code');
}

10
gulpfile.js

@ -90,6 +90,12 @@ gulp.task('update-version-settings', function() { @@ -90,6 +90,12 @@ gulp.task('update-version-settings', function() {
.pipe(gulp.dest('app/partials'));
});
gulp.task('update-version-mtproto', function() {
return gulp.src('app/js/lib/mtproto.js')
.pipe($.replace(/'.+?', 'app_version'/, '\'' + pj.version + '\', \'app_version\''))
.pipe(gulp.dest('app/js/lib'));
});
gulp.task('update-version-comments', function() {
return gulp.src('app/**/*.js')
.pipe($.replace(/Webogram v[0-9.]*/, 'Webogram v' + pj.version))
@ -139,7 +145,9 @@ gulp.task('clean', function() { @@ -139,7 +145,9 @@ gulp.task('clean', function() {
return gulp.src(['dist/*', 'app/js/templates.js', '!dist/.git']).pipe($.clean());
});
gulp.task('bump', ['update-version-manifests', 'update-version-settings', 'update-version-comments']);
gulp.task('bump', ['update-version-manifests', 'update-version-settings', 'update-version-mtproto'], function () {
gulp.start('update-version-comments');
});
gulp.task('build', ['usemin', 'copy', 'copy-images'], function () {
gulp.start('disable-production');

Loading…
Cancel
Save