Skip to content

Commit

Permalink
Fix bugs caused by new features when changing channels
Browse files Browse the repository at this point in the history
  • Loading branch information
douglascdev committed Dec 8, 2023
1 parent 377186f commit 1da51ac
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
7 changes: 1 addition & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
Changes:
* Add 7tv emote support
* Add twitch emote support
* Add chat completion for twitch emotes
* Add chat completion for 7tv emotes
* Save settings and log on the right user folder for each OS
* Fix light theme text
* Fix bugs caused by new features when changing channels

5 changes: 2 additions & 3 deletions hasherino/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,9 @@ async def message_received(self, message: ParsedMessage):
case Command.PRIVMSG:
author: str = message.get_author_displayname()
stv_emotes = await self.memory_storage.get("7tv_emotes")
channel = await self.persistent_storage.get("channel")
channel_emotes = (
stv_emotes[await self.persistent_storage.get("channel")]
if stv_emotes
else {}
stv_emotes[channel] if stv_emotes and channel in stv_emotes else {}
)

await self.chat_container_on_msg(
Expand Down
5 changes: 4 additions & 1 deletion hasherino/components/chat_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ async def add_author_to_user_list(self, author: str):

# Get existing list from memory or initialize a new one
if user_list := await self.memory_storage.get("channel_user_list"):
user_list[tab_name].append(author)
if tab_name in user_list:
user_list[tab_name].append(author)
else:
user_list[tab_name] = [author]
else:
user_list = {tab_name: [author]}

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "hasherino"
description = "hasherino is a twitch chat client built using flet"
version = "0.1.10"
version = "0.1.11"
authors = [
{ name = "Douglas", email = "hashy.software@gmail.com" }
]
Expand Down

0 comments on commit 1da51ac

Please sign in to comment.