🐞 fix(新服): 开新服后之前服的活动消失
This commit is contained in:
@@ -109,6 +109,22 @@ export function saveGroupToServer(groupIds: number[], serverIds: number[]) {
|
||||
setActivityTypeAndServer();
|
||||
}
|
||||
|
||||
export function addServerToGroup(groupIds: number[], serverIds: number[]) {
|
||||
for(let groupId of groupIds) {
|
||||
|
||||
if(!groupToServer.has(groupId)) {
|
||||
groupToServer.set(groupId, []);
|
||||
}
|
||||
for(let serverId of serverIds) {
|
||||
let arr = groupToServer.get(groupId)||[];
|
||||
if(arr.indexOf(serverId) == -1) {
|
||||
groupToServer.get(groupId).push(serverId);
|
||||
}
|
||||
}
|
||||
}
|
||||
setActivityTypeAndServer();
|
||||
}
|
||||
|
||||
export function saveActivitiesToGroup(groupId: number, activityDb: number[]) {
|
||||
for(let activityId of activityDb) {
|
||||
if(activities.get(activityId)) {
|
||||
|
||||
Reference in New Issue
Block a user