Skip to content

Commit

Permalink
fix(storage): 修复修改物品时,过期日期会消失的问题 #76
Browse files Browse the repository at this point in the history
看来是忘记给修改页面的过期日期赋初值的原因

同时在主页修改物品之后,强制刷新主页,似乎也解决了 #74 

Fixes #74
  • Loading branch information
he0119 authored Nov 13, 2020
1 parent a515657 commit d030750
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/blocs/storage/item_edit/item_edit_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ItemEditBloc extends Bloc<ItemEditEvent, ItemEditState> {
}
// 从物品管理主页进入
if (storageHomeBloc != null) {
storageHomeBloc.add(StorageHomeChanged(itemType: ItemType.all));
storageHomeBloc.add(StorageHomeRefreshed(itemType: ItemType.all));
}
// 从搜索界面进入
if (storageSearchBloc != null) {
Expand Down
1 change: 1 addition & 0 deletions lib/pages/storage/item_edit_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ class _ItemEditPageState extends State<ItemEditPage> {
_descriptionController =
TextEditingController(text: widget.item.description);
storageId = widget.item.storage.id;
expirationDate = widget.item.expirationDate;
} else {
_nameController = TextEditingController();
_numberController = TextEditingController(text: '1');
Expand Down

0 comments on commit d030750

Please sign in to comment.