mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-02-18 00:17:40 +01:00
more robust parsing of settings (issue #115)
This commit is contained in:
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -250,14 +250,6 @@ jobs:
|
||||
echo "TAG_EXISTS=false" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
#12 Modify Tag if it Exists
|
||||
- name: Modify Tag
|
||||
if: env.TAG_EXISTS && inputs.build_github
|
||||
id: modify_tag
|
||||
run: |
|
||||
new_version="${{ env.VERSION }}-build-${{ github.run_number }}"
|
||||
echo "VERSION=$new_version" >> $GITHUB_ENV
|
||||
|
||||
#13 Create Release
|
||||
- name: Create Release
|
||||
if: inputs.build_github
|
||||
|
||||
@@ -115,10 +115,16 @@ class KeyPair {
|
||||
)
|
||||
: Offset.zero;
|
||||
|
||||
final buttons = decoded['actions']
|
||||
.map<ControllerButton?>((e) => ControllerButton.values.firstOrNullWhere((element) => element.name == e))
|
||||
.where((e) => e != null)
|
||||
.cast<ControllerButton>()
|
||||
.toList();
|
||||
if (buttons.isEmpty) {
|
||||
return null;
|
||||
}
|
||||
return KeyPair(
|
||||
buttons: decoded['actions']
|
||||
.map<ControllerButton>((e) => ControllerButton.values.firstWhere((element) => element.name == e))
|
||||
.toList(),
|
||||
buttons: buttons,
|
||||
logicalKey: decoded.containsKey('logicalKey') && int.parse(decoded['logicalKey']) != 0
|
||||
? LogicalKeyboardKey(int.parse(decoded['logicalKey']))
|
||||
: null,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:dartx/dartx.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../bluetooth/messages/notification.dart';
|
||||
@@ -27,7 +28,7 @@ class _LogviewerState extends State<LogViewer> {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_actions.add((date: DateTime.now(), entry: data.toString()));
|
||||
_actions = _actions.takeLast(60).toList();
|
||||
_actions = _actions.takeLast(kIsWeb ? 1000 : 60).toList();
|
||||
});
|
||||
if (_scrollController.hasClients) {
|
||||
// scroll to the bottom
|
||||
|
||||
Reference in New Issue
Block a user