Skip to content

Commit

Permalink
Disable image dimension fetch when compact mode is enabled (#950)
Browse files Browse the repository at this point in the history
* image dimension fetch is now disabled when compact mode is enabled

* linting and changelog
  • Loading branch information
hjiangsu committed Dec 5, 2023
1 parent ad0cf2f commit 85c90a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
### Fixed
- Fixed issue where custom tabs would not respect default browser when opening links
- Fixed issue where initial app startup takes a long time to load (503 errors)
- Fixed issue where image dimensions were being fetched regardless of post view types (card/compact)

## 0.2.6 - 2023-11-22
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion lib/post/utils/post.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Future<PostView> savePost(int postId, bool save) async {
Future<List<PostViewMedia>> parsePostViews(List<PostView> postViews) async {
SharedPreferences prefs = (await UserPreferences.instance).sharedPreferences;

bool fetchImageDimensions = prefs.getBool(LocalSettings.showPostFullHeightImages.name) ?? false;
bool fetchImageDimensions = prefs.getBool(LocalSettings.showPostFullHeightImages.name) == true && prefs.getBool(LocalSettings.useCompactView.name) != true;
bool edgeToEdgeImages = prefs.getBool(LocalSettings.showPostEdgeToEdgeImages.name) ?? false;
bool tabletMode = prefs.getBool(LocalSettings.useTabletMode.name) ?? false;
bool hideNsfwPosts = prefs.getBool(LocalSettings.hideNsfwPosts.name) ?? false;
Expand Down

0 comments on commit 85c90a3

Please sign in to comment.