diff --git a/LIBCWTCH-GO.version b/LIBCWTCH-GO.version index 8cf6253a..078b0378 100644 --- a/LIBCWTCH-GO.version +++ b/LIBCWTCH-GO.version @@ -1 +1 @@ -2023-04-17-10-52-v0.0.3-15-gf485e37 \ No newline at end of file +2023-04-18-13-51-v0.0.3-16-ge12afc9 \ No newline at end of file diff --git a/android/app/src/main/kotlin/im/cwtch/flwtch/MainActivity.kt b/android/app/src/main/kotlin/im/cwtch/flwtch/MainActivity.kt index 3b3c4d85..7f19e000 100644 --- a/android/app/src/main/kotlin/im/cwtch/flwtch/MainActivity.kt +++ b/android/app/src/main/kotlin/im/cwtch/flwtch/MainActivity.kt @@ -442,7 +442,7 @@ class MainActivity: FlutterActivity() { val profile: String = call.argument("ProfileOnion") ?: "" val conversation: Int = call.argument("conversation") ?: 0 val fileKey: String = call.argument("fileKey") ?: "" - Cwtch.verifyOrResumeDownload(profile, conversation.toLong(), fileKey) + Cwtch.verifyOrResumeDownloadDefaultLimit(profile, conversation.toLong(), fileKey) } "UpdateSettings" -> { val json: String = call.argument("json") ?: "" diff --git a/lib/cwtch/ffi.dart b/lib/cwtch/ffi.dart index b5ed651c..5c70e7bc 100644 --- a/lib/cwtch/ffi.dart +++ b/lib/cwtch/ffi.dart @@ -498,7 +498,7 @@ class CwtchFfi implements Cwtch { @override // ignore: non_constant_identifier_names void VerifyOrResumeDownload(String profileOnion, int contactHandle, String filekey) { - var fn = library.lookup>("c_VerifyOrResumeDownload"); + var fn = library.lookup>("c_VerifyOrResumeDownloadDefaultLimit"); // ignore: non_constant_identifier_names final VerifyOrResumeDownload = fn.asFunction(); final u1 = profileOnion.toNativeUtf8(); diff --git a/lib/main.dart b/lib/main.dart index f972a018..449b4026 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -131,7 +131,7 @@ class FlwtchState extends State with WindowListener { key: Key('app'), navigatorKey: navKey, locale: settings.locale, - showPerformanceOverlay: false, + showPerformanceOverlay: settings.profileMode, localizationsDelegates: >[ AppLocalizations.delegate, MaterialLocalizationDelegate(), diff --git a/lib/settings.dart b/lib/settings.dart index 956fd5b9..74eb7af8 100644 --- a/lib/settings.dart +++ b/lib/settings.dart @@ -69,6 +69,15 @@ class Settings extends ChangeNotifier { String get torCacheDir => _torCacheDir; + // Whether to show the profiling interface, not saved + bool _profileMode = false; + + bool get profileMode => _profileMode; + set profileMode(bool newval) { + this._profileMode = newval; + notifyListeners(); + } + set useSemanticDebugger(bool newval) { this._useSemanticDebugger = newval; notifyListeners(); diff --git a/lib/views/globalsettingsview.dart b/lib/views/globalsettingsview.dart index fda4ca89..30f1fc18 100644 --- a/lib/views/globalsettingsview.dart +++ b/lib/views/globalsettingsview.dart @@ -545,6 +545,24 @@ class _GlobalSettingsViewState extends State { child: SelectableText(AppLocalizations.of(context)!.versionBuilddate.replaceAll("%1", EnvironmentConfig.BUILD_VER).replaceAll("%2", EnvironmentConfig.BUILD_DATE)), ) ]), + SwitchListTile( + // TODO: Translate, Remove, OR Hide Prior to Release + title: Text("Show Performance Overlay", style: TextStyle(color: settings.current().mainTextColor)), + subtitle: Text("Display an overlay graph of render time."), + value: settings.profileMode, + onChanged: (bool value) { + setState(() { + if (value) { + settings.profileMode = value; + } else { + settings.profileMode = value; + } + }); + }, + activeTrackColor: settings.theme.defaultButtonActiveColor, + inactiveTrackColor: settings.theme.defaultButtonDisabledColor, + secondary: Icon(Icons.bar_chart, color: settings.current().mainTextColor), + ), Visibility( visible: EnvironmentConfig.BUILD_VER == dev_version && !Platform.isAndroid, child: SwitchListTile(