mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Reset chat options when change guild routes (#9743)
This commit is contained in:
@@ -57,10 +57,19 @@ export default {
|
||||
this.currentSearchPosition = newText.length - 1;
|
||||
},
|
||||
chat () {
|
||||
this.resetDefaults();
|
||||
this.grabUserNames();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
resetDefaults () {
|
||||
// Mounted is not called when switching between group pages because they have the
|
||||
// the same parent component. So, reset the data
|
||||
this.currentSearch = '';
|
||||
this.searchActive = false;
|
||||
this.currentSearchPosition = 0;
|
||||
this.tmpSelections = [];
|
||||
},
|
||||
grabUserNames () {
|
||||
let usersThatMessage = groupBy(this.chat, 'user');
|
||||
for (let userName in usersThatMessage) {
|
||||
|
||||
Reference in New Issue
Block a user