Skip to content

Commit

Permalink
Fix Thunder being locked to 60Hz on 120Hz displays on Android (#1010)
Browse files Browse the repository at this point in the history
* Fix thunder being locked to 60Hz on 120Hz displays

* Update CHANGELOG

* updated changelog

* removed extra changelog line

---------

Co-authored-by: Hamlet Jiang Su <hamlet.jiangsu@outlook.com>
  • Loading branch information
mufeedali and hjiangsu authored Jan 4, 2024
1 parent 3855182 commit 4278faf
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Unreleased
### Fixed
- Fixed issue where Thunder was being locked to 60Hz on 120Hz displays on Android

## 0.2.7 - 2024-01-03
## Added
- Added ability to collapse post in post page
Expand Down
3 changes: 3 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:flutter/services.dart';

// External Packages
import 'package:flutter_bloc/flutter_bloc.dart';
import "package:flutter_displaymode/flutter_displaymode.dart";
import 'package:flutter_native_splash/flutter_native_splash.dart';
import 'package:l10n_esperanto/l10n_esperanto.dart';
import 'package:overlay_support/overlay_support.dart';
Expand Down Expand Up @@ -50,6 +51,8 @@ void main() async {
LemmyClient.instance.changeBaseUrl(initialInstance);

runApp(const ThunderApp());
// Set high refresh rate after app initialization
FlutterDisplayMode.setHighRefreshRate();
}

class ThunderApp extends StatelessWidget {
Expand Down
8 changes: 8 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.0-beta+1"
flutter_displaymode:
dependency: "direct main"
description:
name: flutter_displaymode
sha256: "42c5e9abd13d28ed74f701b60529d7f8416947e58256e6659c5550db719c57ef"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
flutter_file_dialog:
dependency: "direct main"
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ dependencies:
l10n_esperanto: ^2.0.8
sqflite_common_ffi_web: ^0.4.2
jovial_svg: ^1.1.19
flutter_displaymode: ^0.6.0

dev_dependencies:
build_runner: ^2.4.6
Expand Down

0 comments on commit 4278faf

Please sign in to comment.