<commit_before>'use strict';
let viewModule = require('ui/core/view');
let animations = require('nativescript-effects');

viewModule.View.prototype.animateTap = function (duration, opacity) {
  duration = duration || 25;
  opacity = opacity || 0.8;
  
  let that = this;
  this.fadeTo(duration, opacity)
        .then(function () {
          that.fadeTo(duration, 1);
        });
};<commit_msg>Changed the custom animations to return promise.<commit_after>'use strict';
let viewModule = require('ui/core/view');
let animations = require('nativescript-effects');

viewModule.View.prototype.animateTap = function(duration, opacity) {
  duration = duration || 50;
  opacity = opacity || 0.8;

  let that = this;
  let promise = new Promise(function(resolve, reject) {
    that.fadeTo(duration, opacity)
      .then(function() {
        return that.fadeTo(duration, 1);
      })
      .then(resolve, reject);
  });

  return promise;
};
{'fraction_non_alphanumeric': 0.1427038626609442, 'fraction_numerical': 0.01072961373390558, 'mean_word_length': 3.6884422110552766, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3721574', 'n_tokens_mistral': 295, 'n_tokens_neox': 273, 'n_words': 67}