The change has the following title: [Bug Fix] 【阅读器】【iOS】上下模式章首位置退出阅读器重进,顶部操作栏会遮挡 Do not…
- User
The change has the following title: [Bug Fix] 【阅读器】【iOS】上下模式章首位置退出阅读器重进,顶部操作栏会遮挡
Do not provide feedback yet. I will follow-up with a description of the change in a new message
File Path: External_Modules/FQReaderSaaS/FQReaderSaaS/Classes/Impl/Business/Reader/Manager/FQReaderManager.m Diff:
703: 704: CGFloat screenTop = SCREEN_SAFE_TOP; 705: CGFloat screenBottom = SCREEN_SAFE_BOTTOM; --- config.layoutConfigPageInsetBlock = ^UIEdgeInsets(BDReaderConfig * _Nonnull config) { 706:+++ config.layoutConfigPageInsetBlock = ^UIEdgeInsets(BDReaderConfig * _Nonnull config, BDReaderPageMode pageMode) { 707: @strongify(self); 708: CGFloat marginL = 24; 709: CGFloat marginR = marginL;Diff:
736: } 737: UIEdgeInsets insets = UIEdgeInsetsMake(MAX(screenTop, 20) + pageTop, marginL, pageBottom, marginR); 738: --- if (config.pageMode == BDReaderPageModeScroll) { 739:+++ if (pageMode == BDReaderPageModeScroll) { 740: insets = UIEdgeInsetsMake(0, marginL, 0, marginR); 741: } 742:
A description was given to help you assist in understand why these changes were made What does this MR done:
- Modified the signature of the layoutConfigPageInsetBlock function to include an additional parameter, BDReaderPageMode, which represents the page mode.
- Updated the logic within the layoutConfigPageInsetBlock function to use the new BDReaderPageMode parameter instead of the config.pageMode.
- Adjusted the insets calculation to ensure consistency across different page modes.
- Updated the scrollLocationLineOffsetY function to use the new layoutConfigPageInsetBlock with the BDReaderPageMode parameter.
- Ensured that the UI adjustments are consistent with the new parameter changes in the layout configuration.
Which functions are involved and why:
- layoutConfigPageInsetBlock: This function is responsible for calculating the insets for the reader's layout. It has been updated to include the BDReaderPageMode parameter to better handle different page modes.
- calPageInset: This helper function is used to calculate the page insets based on the page mode. It has been updated to accept the BDReaderPageMode parameter.
- scrollLocationLineOffsetY: This function calculates the Y-offset for the scroll location line. It has been updated to use the new layoutConfigPageInsetBlock with the BDReaderPageMode parameter to ensure correct positioning.
What's the purpose of this MR:
- Fix a bug where the top operation bar would遮挡 when re-entering the reader in scroll mode after exiting from the top of the screen.
- Improve the flexibility and maintainability of the layout configuration by introducing the BDReaderPageMode parameter.
- Assistant