performance #663
|
@ -1 +1 @@
|
|||
2023-04-17-10-52-v0.0.3-15-gf485e37
|
||||
2023-04-18-13-51-v0.0.3-16-ge12afc9
|
|
@ -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") ?: ""
|
||||
|
|
|
@ -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<NativeFunction<void_from_string_int_string_function>>("c_VerifyOrResumeDownload");
|
||||
var fn = library.lookup<NativeFunction<void_from_string_int_string_function>>("c_VerifyOrResumeDownloadDefaultLimit");
|
||||
// ignore: non_constant_identifier_names
|
||||
final VerifyOrResumeDownload = fn.asFunction<VoidFromStringIntStringFn>();
|
||||
final u1 = profileOnion.toNativeUtf8();
|
||||
|
|
|
@ -131,7 +131,7 @@ class FlwtchState extends State<Flwtch> with WindowListener {
|
|||
key: Key('app'),
|
||||
navigatorKey: navKey,
|
||||
locale: settings.locale,
|
||||
showPerformanceOverlay: false,
|
||||
showPerformanceOverlay: settings.profileMode,
|
||||
localizationsDelegates: <LocalizationsDelegate<dynamic>>[
|
||||
AppLocalizations.delegate,
|
||||
MaterialLocalizationDelegate(),
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -545,6 +545,24 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
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(
|
||||
|
|
Loading…
Reference in New Issue