diff --git a/src/ui/app.py b/src/ui/app.py index 8375843..314e8dc 100644 --- a/src/ui/app.py +++ b/src/ui/app.py @@ -337,13 +337,10 @@ class Application(QMainWindow): old_data = convert_data(old_data_str) new_data = convert_data(new_data) if old_data != new_data: - self.handle_data_change(table, col, new_data - old_data, account_username, notifications) - - def handle_data_change(self, table, col, count_change, account_username, notifications): - """处理表格数据变更,更新单元格颜色,并生成通知""" - self.update_cell_color(table, table.rowCount() - 1, col, count_change) - self.generate_notifications(account_username, col, col, count_change, notifications) - + count_change = new_data - old_data + self.update_cell_color(table, row, col, count_change) + # 确保传递 cell_data 和 count_change 参数 + self.generate_notifications(account_username, col, new_data, count_change, notifications) def update_cell_color(self, table, row, col, count_change): """更新单元格颜色""" cell = table.item(row, col)