Game Log immediately show profile

Bit of a crude fix...
This commit is contained in:
Natsumi
2020-12-02 21:00:15 +13:00
committed by pypy
parent 8aa1b2621f
commit 26f2d29bba

View File

@@ -4640,7 +4640,7 @@ import gameLogService from './service/gamelog.js'
Discord.SetActive(this.discordActive);
};
$app.methods.lookupUser = function (name) {
$app.methods.lookupUser = async function (name) {
for (var ref of API.cachedUsers.values()) {
if (ref.displayName === name) {
this.showUserDialog(ref.id);
@@ -4648,9 +4648,15 @@ import gameLogService from './service/gamelog.js'
}
}
this.searchText = name;
this.search();
this.$refs.menu.activeIndex = 'search';
this.$refs.searchTab.currentName = '0';
await this.search();
for (var ref of API.cachedUsers.values()) {
if (ref.displayName === name) {
this.showUserDialog(ref.id);
return;
}
}
this.$refs.menu.activeIndex = 'search';
};
// App: Search
@@ -4687,21 +4693,21 @@ import gameLogService from './service/gamelog.js'
this.searchAvatarResults = [];
};
$app.methods.search = function () {
this.searchUser();
$app.methods.search = async function () {
await this.searchUser();
this.searchWorld({});
};
$app.methods.searchUser = function () {
$app.methods.searchUser = async function () {
this.searchUserParams = {
n: 10,
offset: 0,
search: this.searchText
};
this.moreSearchUser();
await this.moreSearchUser();
};
$app.methods.moreSearchUser = function (go) {
$app.methods.moreSearchUser = async function (go) {
var params = this.searchUserParams;
if (go) {
params.offset += params.n * go;
@@ -4710,7 +4716,7 @@ import gameLogService from './service/gamelog.js'
}
}
this.isSearchUserLoading = true;
API.getUsers(params).finally(() => {
await API.getUsers(params).finally(() => {
this.isSearchUserLoading = false;
}).then((args) => {
var map = new Map();