mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-15 08:25:25 +00:00
fix(mail(js)): force search when restoring mailbox during navigation
This commit is contained in:
@@ -72,7 +72,7 @@
|
||||
<md-icon>search</md-icon>
|
||||
</md-button>
|
||||
<a href="#" class="sg-folder-name"
|
||||
ng-click="mailbox.searchMode($event)" ng-bind="mailbox.selectedFolder.$displayName"><!-- mailbox name --></a>
|
||||
ng-click="mailbox.searchMode($event)" ng-bind="mailbox.service.selectedFolder.$displayName"><!-- mailbox name --></a>
|
||||
<md-menu>
|
||||
<md-button class="sg-icon-button" label:aria-label="Sort"
|
||||
ng-click="$mdMenu.open()">
|
||||
|
||||
@@ -868,13 +868,18 @@
|
||||
* @memberof Mailbox.prototype
|
||||
* @desc Reset the original state the mailbox's data.
|
||||
*/
|
||||
Mailbox.prototype.$reset = function() {
|
||||
Mailbox.prototype.$reset = function(options) {
|
||||
var _this = this;
|
||||
angular.forEach(this.$shadowData, function(value, key) {
|
||||
delete _this[key];
|
||||
});
|
||||
angular.extend(this, this.$shadowData);
|
||||
this.$shadowData = this.$omit();
|
||||
if (options && options.filter) {
|
||||
this.$messages = [];
|
||||
this.$visibleMessages = [];
|
||||
delete this.$syncToken;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -53,8 +53,14 @@
|
||||
title += ' | ' + defaultWindowTitle;
|
||||
$window.document.title = title;
|
||||
});
|
||||
};
|
||||
|
||||
$scope.$on('$destroy', function() {
|
||||
if (vm.mode.search) {
|
||||
vm.mode.search = false;
|
||||
vm.selectedFolder.$reset({ filter: true });
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function _registerHotkeys(keys) {
|
||||
keys.push(sgHotkeys.createHotkey({
|
||||
|
||||
Reference in New Issue
Block a user