TF-859 Keep local copy in Forwarding

This commit is contained in:
ManhNTX
2022-08-24 16:13:16 +07:00
committed by Dat H. Pham
parent 199cb2529c
commit 8f119933a2
2 changed files with 3 additions and 5 deletions
@@ -53,6 +53,8 @@ class ForwardController extends BaseController {
final listForwards = <String>[].obs;
bool get currentForwardLocalCopyState => currentForward.value?.localCopy ?? false;
ForwardController(
this._getForwardInteractor,
this._deleteRecipientInForwardingInteractor,
@@ -282,10 +284,6 @@ class ForwardController extends BaseController {
listRecipientForward.value = currentForward.value!.listRecipientForward;
}
bool getCurrentForwardLocalCopyState() {
return currentForward.value?.localCopy ?? false;
}
void handleEditLocalCopy() {
final accountId = accountDashBoardController.accountId.value;
if (accountId != null && currentForward.value != null) {
@@ -103,7 +103,7 @@ class ForwardHeaderWidget extends GetWidget<ForwardController> {
fontSize: 16,
fontWeight: FontWeight.w400,
color: Colors.black)),
value: controller.getCurrentForwardLocalCopyState(),
value: controller.currentForwardLocalCopyState,
onChanged: (_) {
controller.handleEditLocalCopy();
},