mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-04 22:06:06 +02:00
refactor: Splitting API requests from app.js (#1166)
* splitting API requests form app.js * fix: vip friends display issue
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import configRepository from '../repository/config.js';
|
||||
import { baseClass, $app, API, $t, $utils } from './baseClass.js';
|
||||
import { worldRequest } from './request';
|
||||
|
||||
export default class extends baseClass {
|
||||
constructor(_app, _API, _t) {
|
||||
@@ -48,14 +49,17 @@ export default class extends baseClass {
|
||||
L.thumbnailImageUrl = ref.thumbnailImageUrl;
|
||||
L.worldCapacity = ref.capacity;
|
||||
} else {
|
||||
API.getWorld({
|
||||
worldId: L.worldId
|
||||
}).then((args) => {
|
||||
L.worldName = args.ref.name;
|
||||
L.thumbnailImageUrl = args.ref.thumbnailImageUrl;
|
||||
L.worldCapacity = args.ref.capacity;
|
||||
return args;
|
||||
});
|
||||
worldRequest
|
||||
.getWorld({
|
||||
worldId: L.worldId
|
||||
})
|
||||
.then((args) => {
|
||||
L.worldName = args.ref.name;
|
||||
L.thumbnailImageUrl =
|
||||
args.ref.thumbnailImageUrl;
|
||||
L.worldCapacity = args.ref.capacity;
|
||||
return args;
|
||||
});
|
||||
}
|
||||
if (this.isGameNoVR) {
|
||||
var platform = 'Desktop';
|
||||
|
||||
Reference in New Issue
Block a user