appDisplay: Use correct view for animation

We currently assume that the current view matches the 'app-picker-view'
setting. While that is usually the case, there is one notable exception:
While there isn't sufficient usage data (yet), we show all applications
instead of an empty frequent view regardless of the setting. We should
animate the actually visible icons in that case, not the (non-existent)
ones from the hidden frequent view.

https://bugzilla.gnome.org/show_bug.cgi?id=774381
This commit is contained in:
Florian Müllner 2016-11-17 16:24:44 +01:00
parent 407d51e871
commit e661d904de

View File

@ -1010,7 +1010,7 @@ const AppDisplay = new Lang.Class({
}, },
animate: function(animationDirection, onComplete) { animate: function(animationDirection, onComplete) {
let currentView = this._views[global.settings.get_uint('app-picker-view')].view; let currentView = this._views.filter(v => v.control.has_style_pseudo_class('checked')).pop().view;
// Animate controls opacity using iconGrid animation time, since // Animate controls opacity using iconGrid animation time, since
// it will be the time the AllView or FrequentView takes to show // it will be the time the AllView or FrequentView takes to show