| 104 | } |
| 105 | |
| 106 | onSyncClans (clans) { |
| 107 | if (clans == null) { return } |
| 108 | this.idNameMap = [] |
| 109 | this.clanModels = clans |
| 110 | const options = { |
| 111 | url: '/db/user/-/names', |
| 112 | method: 'POST', |
| 113 | data: { ids: _.map(clans, clan => clan.get('ownerID')) }, |
| 114 | success: (models, response, options) => { |
| 115 | for (const userID in models) { this.idNameMap[userID] = models[userID].name } |
| 116 | return (typeof this.render === 'function' ? this.render() : undefined) |
| 117 | } |
| 118 | } |
| 119 | return this.supermodel.addRequestResource('user_names', options, 0).load() |
| 120 | } |
| 121 | |
| 122 | onSyncLevelSessions (levelSessions) { |
| 123 | let language |