Skip to content

Commit

Permalink
Revert "fix: issue moesnow#379"
Browse files Browse the repository at this point in the history
This reverts commit 98b5390.
  • Loading branch information
CL4R3T committed Nov 22, 2024
1 parent 97c85ef commit 4f71509
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/card/pushsettingcard1.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def keyPressEvent(self, e: QKeyEvent):
class PushSettingCardInstance(PushSettingCard):
def __init__(self, text, icon: Union[str, QIcon, FluentIconBase], title, configname, configtemplate, parent=None):
self.configtemplate = configtemplate
self.configvalue = cfg.get_value(configname).copy()
self.configvalue = cfg.get_value(configname)
super().__init__(text, icon, title, configname, str(self.configvalue), parent)
self.button.clicked.connect(self.__onclicked)

Expand All @@ -93,13 +93,13 @@ def __onclicked(self):
if message_box.exec():
for type, combobox in message_box.comboBox_dict.items():
self.configvalue[type] = combobox.text().split('(')[0]
cfg.set_value(self.configname, self.configvalue.copy())
cfg.set_value(self.configname, self.configvalue)
self.contentLabel.setText(str(self.configvalue))


class PushSettingCardNotifyTemplate(PushSettingCard):
def __init__(self, text, icon: Union[str, QIcon, FluentIconBase], title, configname, parent=None):
self.configvalue = cfg.get_value(configname).copy()
self.configvalue = cfg.get_value(configname)
super().__init__(text, icon, title, configname, "", parent)
self.button.clicked.connect(self.__onclicked)

Expand All @@ -108,7 +108,7 @@ def __onclicked(self):
if message_box.exec():
for id, lineedit in message_box.lineEdit_dict.items():
self.configvalue[id] = lineedit.text().replace(r"\n", "\n")
cfg.set_value(self.configname, self.configvalue.copy())
cfg.set_value(self.configname, self.configvalue)


class PushSettingCardTeam(PushSettingCard):
Expand Down

0 comments on commit 4f71509

Please sign in to comment.