From 296c6e8044caa46b149cf69fc15f28ac23a638d2 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Mon, 21 Aug 2023 15:51:54 +0200 Subject: [PATCH] Fixed stuff #1.1.0 --- .../modules/achievements/events/achievement_on_message_event.py | 1 + .../achievements/events/achievement_on_reaction_add_event.py | 1 + .../achievements/events/achievement_on_reaction_remove_event.py | 1 + kdb-web/src/app/services/sidebar/sidebar.service.ts | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/kdb-bot/src/modules/achievements/events/achievement_on_message_event.py b/kdb-bot/src/modules/achievements/events/achievement_on_message_event.py index 091e041b..b3564ccf 100644 --- a/kdb-bot/src/modules/achievements/events/achievement_on_message_event.py +++ b/kdb-bot/src/modules/achievements/events/achievement_on_message_event.py @@ -53,6 +53,7 @@ class AchievementOnMessageEvent(OnMessageABC): user = self._users.get_user_by_discord_id_and_server_id(message.author.id, server.id) user.message_count += 1 + self._users.update_user(user) self._db.save_changes() await self._achievements.validate_achievements_for_user(user) diff --git a/kdb-bot/src/modules/achievements/events/achievement_on_reaction_add_event.py b/kdb-bot/src/modules/achievements/events/achievement_on_reaction_add_event.py index dad3a8f1..b033b534 100644 --- a/kdb-bot/src/modules/achievements/events/achievement_on_reaction_add_event.py +++ b/kdb-bot/src/modules/achievements/events/achievement_on_reaction_add_event.py @@ -57,5 +57,6 @@ class AchievementOnReactionAddEvent(OnReactionAddABC): user.reaction_count += 1 self._db.save_changes() + self._users.update_user(user) await self._achievements.validate_achievements_for_user(user) diff --git a/kdb-bot/src/modules/achievements/events/achievement_on_reaction_remove_event.py b/kdb-bot/src/modules/achievements/events/achievement_on_reaction_remove_event.py index db953ed3..bbb33f28 100644 --- a/kdb-bot/src/modules/achievements/events/achievement_on_reaction_remove_event.py +++ b/kdb-bot/src/modules/achievements/events/achievement_on_reaction_remove_event.py @@ -57,5 +57,6 @@ class AchievementOnReactionRemoveEvent(OnReactionRemoveABC): user.reaction_count -= 1 self._db.save_changes() + self._users.update_user(user) await self._achievements.validate_achievements_for_user(user) diff --git a/kdb-web/src/app/services/sidebar/sidebar.service.ts b/kdb-web/src/app/services/sidebar/sidebar.service.ts index b79464bc..c4d1a102 100644 --- a/kdb-web/src/app/services/sidebar/sidebar.service.ts +++ b/kdb-web/src/app/services/sidebar/sidebar.service.ts @@ -69,7 +69,7 @@ export class SidebarService { async buildMenu(user: UserDTO | null, hasPermission: boolean, isTechnician: boolean = false) { this.dashboard = { - label: this.translateService.instant("sidebar.dashboard"), + label: this.isSidebarOpen ? this.translateService.instant("sidebar.dashboard") : "", icon: "pi pi-th-large", routerLink: "dashboard" };