diff --git a/iOS/Demo/TUIKitDemo/Classic/Setting/SettingController.m b/iOS/Demo/TUIKitDemo/Classic/Setting/SettingController.m index fdf3e29a753..a937e897f0f 100644 --- a/iOS/Demo/TUIKitDemo/Classic/Setting/SettingController.m +++ b/iOS/Demo/TUIKitDemo/Classic/Setting/SettingController.m @@ -40,6 +40,7 @@ - (void)viewDidLoad { TUISettingController *vc = [[TUISettingController alloc] init]; vc.delegate = self; + vc.msgNeedReadReceipt = [TUIChatConfig defaultConfig].msgNeedReadReceipt; vc.aboutCellText = NSLocalizedString(@"MeAbout", nil); vc.view.frame = self.view.bounds; [self addChildViewController:vc]; @@ -55,6 +56,7 @@ - (void)onTapTest:(UIGestureRecognizer *)recognizer { #pragma mark TUISettingControllerDelegate - (void)onSwitchMsgReadStatus:(BOOL)isOn { + [TUIChatConfig defaultConfig].msgNeedReadReceipt = isOn; [[NSUserDefaults standardUserDefaults] setBool:isOn forKey:kEnableMsgReadStatus]; [[NSUserDefaults standardUserDefaults] synchronize]; } diff --git a/iOS/Demo/TUIKitDemo/Minimalist/Setting/SettingController_Minimalist.m b/iOS/Demo/TUIKitDemo/Minimalist/Setting/SettingController_Minimalist.m index 283a30500f0..1f30bea6519 100644 --- a/iOS/Demo/TUIKitDemo/Minimalist/Setting/SettingController_Minimalist.m +++ b/iOS/Demo/TUIKitDemo/Minimalist/Setting/SettingController_Minimalist.m @@ -40,6 +40,7 @@ - (void)viewDidLoad { TUISettingController_Minimalist *vc = [[TUISettingController_Minimalist alloc] init]; vc.delegate = self; + vc.msgNeedReadReceipt = [TUIChatConfig defaultConfig].msgNeedReadReceipt; vc.aboutCellText = NSLocalizedString(@"MeAbout", nil); vc.view.frame = self.view.bounds; [self addChildViewController:vc]; @@ -55,6 +56,7 @@ - (void)onTapTest:(UIGestureRecognizer *)recognizer { #pragma mark TUISettingControllerDelegate_Minimalist - (void)onSwitchMsgReadStatus:(BOOL)isOn { + [TUIChatConfig defaultConfig].msgNeedReadReceipt = isOn; [[NSUserDefaults standardUserDefaults] setBool:isOn forKey:kEnableMsgReadStatus_mini]; [[NSUserDefaults standardUserDefaults] synchronize]; }