Skip to content

Commit

Permalink
Merge pull request #77 from ZhuJHua/dev
Browse files Browse the repository at this point in the history
Release at 2.6.4 as hotfix
  • Loading branch information
ZhuJHua authored Dec 15, 2024
2 parents d0beed5 + 8cf07ba commit 06f9dcf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ mixin BasicCardLogic {
//如果分类为空,删除主页即可,如果分类不为空,双删除
if (diary.categoryId != null && Bind.isRegistered<DiaryTabViewLogic>(tag: diary.categoryId)) {
Bind.find<DiaryTabViewLogic>(tag: diary.categoryId).state.diaryList.removeWhere((e) => e.id == diary.id);
Bind.find<DiaryTabViewLogic>(tag: diary.categoryId).update(['TabView']);
Bind.find<DiaryTabViewLogic>(tag: diary.categoryId).update();
}
Bind.find<DiaryTabViewLogic>(tag: 'default').state.diaryList.removeWhere((e) => e.id == diary.id);
Bind.find<DiaryTabViewLogic>(tag: 'default').update(['TabView']);
Bind.find<DiaryTabViewLogic>(tag: 'default').update();
} else {
var newDiary = await IsarUtil.getDiaryByID(diary.isarId);
if (diary == newDiary) {
Expand All @@ -34,7 +34,7 @@ mixin BasicCardLogic {
var oldIndex =
Bind.find<DiaryTabViewLogic>(tag: 'default').state.diaryList.indexWhere((e) => e.id == newDiary.id);
Bind.find<DiaryTabViewLogic>(tag: 'default').state.diaryList.replaceRange(oldIndex, oldIndex + 1, [newDiary]);
Bind.find<DiaryTabViewLogic>(tag: 'default').update(['TabView']);
Bind.find<DiaryTabViewLogic>(tag: 'default').update();
//如果注册了控制器
if (newDiary.categoryId != null && Bind.isRegistered<DiaryTabViewLogic>(tag: newDiary.categoryId)) {
var oldIndex = Bind.find<DiaryTabViewLogic>(tag: newDiary.categoryId)
Expand All @@ -45,7 +45,7 @@ mixin BasicCardLogic {
.state
.diaryList
.replaceRange(oldIndex, oldIndex + 1, [newDiary]);
Bind.find<DiaryTabViewLogic>(tag: newDiary.categoryId).update(['TabView']);
Bind.find<DiaryTabViewLogic>(tag: newDiary.categoryId).update();
}
//await Bind.find<DiaryLogic>().updateDiary(oldCategoryId);
} else {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: mood_diary
description: "A new Flutter project."
publish_to: 'none'
version: 2.6.3+63
version: 2.6.4+64

environment:
sdk: '>=3.4.0 <4.0.0'
Expand Down

0 comments on commit 06f9dcf

Please sign in to comment.