mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-30 20:23:46 +02:00
Quick search history
This commit is contained in:
@@ -6969,9 +6969,30 @@ speechSynthesis.getVoices();
|
|||||||
if (value) {
|
if (value) {
|
||||||
this.quickSearch = '';
|
this.quickSearch = '';
|
||||||
this.quickSearchItems = [];
|
this.quickSearchItems = [];
|
||||||
|
this.quickSearchUserHistory();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// App: Quick Search User History
|
||||||
|
|
||||||
|
$app.data.showUserDialogHistory = new Set();
|
||||||
|
|
||||||
|
$app.methods.quickSearchUserHistory = function () {
|
||||||
|
var userHistory = Array.from(this.showUserDialogHistory.values()).reverse().slice(0, 5);
|
||||||
|
var results = [];
|
||||||
|
userHistory.forEach((userId) => {
|
||||||
|
var ref = API.cachedUsers.get(userId);
|
||||||
|
if (typeof ref !== 'undefined') {
|
||||||
|
results.push({
|
||||||
|
value: ref.id,
|
||||||
|
label: ref.name,
|
||||||
|
ref
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.quickSearchItems = results;
|
||||||
|
};
|
||||||
|
|
||||||
// App: Feed
|
// App: Feed
|
||||||
|
|
||||||
$app.methods.feedSearch = function (row) {
|
$app.methods.feedSearch = function (row) {
|
||||||
@@ -10876,6 +10897,8 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
return args;
|
return args;
|
||||||
});
|
});
|
||||||
|
this.showUserDialogHistory.delete(userId);
|
||||||
|
this.showUserDialogHistory.add(userId);
|
||||||
};
|
};
|
||||||
|
|
||||||
$app.methods.applyUserDialogLocation = function () {
|
$app.methods.applyUserDialogLocation = function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user