Merge pull request 'performance' (#663) from performance into trunk
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Reviewed-on: #663 Reviewed-by: Dan Ballard <dan@openprivacy.ca>
This commit is contained in:
commit
c2f0633efb
|
@ -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 profile: String = call.argument("ProfileOnion") ?: ""
|
||||||
val conversation: Int = call.argument("conversation") ?: 0
|
val conversation: Int = call.argument("conversation") ?: 0
|
||||||
val fileKey: String = call.argument("fileKey") ?: ""
|
val fileKey: String = call.argument("fileKey") ?: ""
|
||||||
Cwtch.verifyOrResumeDownload(profile, conversation.toLong(), fileKey)
|
Cwtch.verifyOrResumeDownloadDefaultLimit(profile, conversation.toLong(), fileKey)
|
||||||
}
|
}
|
||||||
"UpdateSettings" -> {
|
"UpdateSettings" -> {
|
||||||
val json: String = call.argument("json") ?: ""
|
val json: String = call.argument("json") ?: ""
|
||||||
|
|
|
@ -498,7 +498,7 @@ class CwtchFfi implements Cwtch {
|
||||||
@override
|
@override
|
||||||
// ignore: non_constant_identifier_names
|
// ignore: non_constant_identifier_names
|
||||||
void VerifyOrResumeDownload(String profileOnion, int contactHandle, String filekey) {
|
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
|
// ignore: non_constant_identifier_names
|
||||||
final VerifyOrResumeDownload = fn.asFunction<VoidFromStringIntStringFn>();
|
final VerifyOrResumeDownload = fn.asFunction<VoidFromStringIntStringFn>();
|
||||||
final u1 = profileOnion.toNativeUtf8();
|
final u1 = profileOnion.toNativeUtf8();
|
||||||
|
|
|
@ -131,7 +131,7 @@ class FlwtchState extends State<Flwtch> with WindowListener {
|
||||||
key: Key('app'),
|
key: Key('app'),
|
||||||
navigatorKey: navKey,
|
navigatorKey: navKey,
|
||||||
locale: settings.locale,
|
locale: settings.locale,
|
||||||
showPerformanceOverlay: false,
|
showPerformanceOverlay: settings.profileMode,
|
||||||
localizationsDelegates: <LocalizationsDelegate<dynamic>>[
|
localizationsDelegates: <LocalizationsDelegate<dynamic>>[
|
||||||
AppLocalizations.delegate,
|
AppLocalizations.delegate,
|
||||||
MaterialLocalizationDelegate(),
|
MaterialLocalizationDelegate(),
|
||||||
|
|
|
@ -69,6 +69,15 @@ class Settings extends ChangeNotifier {
|
||||||
|
|
||||||
String get torCacheDir => _torCacheDir;
|
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) {
|
set useSemanticDebugger(bool newval) {
|
||||||
this._useSemanticDebugger = newval;
|
this._useSemanticDebugger = newval;
|
||||||
notifyListeners();
|
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)),
|
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(
|
Visibility(
|
||||||
visible: EnvironmentConfig.BUILD_VER == dev_version && !Platform.isAndroid,
|
visible: EnvironmentConfig.BUILD_VER == dev_version && !Platform.isAndroid,
|
||||||
child: SwitchListTile(
|
child: SwitchListTile(
|
||||||
|
|
Loading…
Reference in New Issue