diff --git a/packages/dart/noports_core/lib/src/sshnpd/sshnpd_impl.dart b/packages/dart/noports_core/lib/src/sshnpd/sshnpd_impl.dart index c41be74d8..5a97e85fb 100644 --- a/packages/dart/noports_core/lib/src/sshnpd/sshnpd_impl.dart +++ b/packages/dart/noports_core/lib/src/sshnpd/sshnpd_impl.dart @@ -224,10 +224,11 @@ class SshnpdImpl implements Sshnpd { logger.info('Starting heartbeat'); startHeartbeat(); - logger.info('Subscribing to $device\\.${DefaultArgs.namespace}@'); + String regex = '(^$device|\\.$device)\\.${DefaultArgs.namespace}@'; + logger.info('Subscribing to $regex'); atClient.notificationService .subscribe( - regex: '$device\\.${DefaultArgs.namespace}@', shouldDecrypt: true) + regex: regex, shouldDecrypt: true) .listen( _notificationHandler, onError: (e) => logger.severe('Notification Failed:$e'), diff --git a/packages/dart/npt_flutter/lib/features/settings/models/settings.g.dart b/packages/dart/npt_flutter/lib/features/settings/models/settings.g.dart index 2ccc6be9c..b2e831255 100644 --- a/packages/dart/npt_flutter/lib/features/settings/models/settings.g.dart +++ b/packages/dart/npt_flutter/lib/features/settings/models/settings.g.dart @@ -11,8 +11,7 @@ Settings _$SettingsFromJson(Map json) => Settings( overrideRelay: json['overrideRelay'] as bool, viewLayout: $enumDecode(_$PreferredViewLayoutEnumMap, json['viewLayout']), darkMode: json['darkMode'] as bool? ?? false, - language: $enumDecodeNullable(_$LanguageEnumMap, json['language']) ?? - Language.english, + language: $enumDecode(_$LanguageEnumMap, json['language']), ); Map _$SettingsToJson(Settings instance) => { @@ -32,4 +31,6 @@ const _$LanguageEnumMap = { Language.english: 'en', Language.spanish: 'es', Language.portuguese: 'pt-br', + Language.mandarin: 'zh-hans-cn', + Language.cantonese: 'zh-hant-hk', }; diff --git a/packages/dart/npt_flutter/lib/styles/sizes.dart b/packages/dart/npt_flutter/lib/styles/sizes.dart index 7234716ad..173966b92 100644 --- a/packages/dart/npt_flutter/lib/styles/sizes.dart +++ b/packages/dart/npt_flutter/lib/styles/sizes.dart @@ -150,8 +150,6 @@ class SizeConfig { deviceTextFactor = _mediaQueryData.textScaler.scale(20) / 20; - // print("height is::: $screenHeight"); - if (screenHeight < 1200) { blockSizeHorizontal = screenWidth / 100; blockSizeVertical = screenHeight / 100; @@ -180,7 +178,6 @@ class SizeConfig { // } double res = (val / refWidth) * 100; double temp = res * blockSizeHorizontal; - // print("width$temp"); return temp; } @@ -205,7 +202,7 @@ class SizeConfig { } else { temp = res * safeBlockVertical + (val * 0.2473919523099851) * textFactor; } - // print('$val,$temp,$refHeight,$refWidth'); + final maxSize = val + Sizes.p4; if (temp > maxSize) { return maxSize; diff --git a/packages/dart/npt_flutter/lib/util/language.dart b/packages/dart/npt_flutter/lib/util/language.dart index e2543a82a..511f3f974 100644 --- a/packages/dart/npt_flutter/lib/util/language.dart +++ b/packages/dart/npt_flutter/lib/util/language.dart @@ -9,9 +9,9 @@ enum Language { spanish, @JsonValue("pt-br") portuguese, - @JsonValue("cn") + @JsonValue("zh-hans-cn") mandarin, - @JsonValue("hk") + @JsonValue("zh-hant-hk") cantonese, } diff --git a/packages/dart/npt_flutter/pubspec.lock b/packages/dart/npt_flutter/pubspec.lock index 9a1048c72..2601b3143 100644 --- a/packages/dart/npt_flutter/pubspec.lock +++ b/packages/dart/npt_flutter/pubspec.lock @@ -1549,10 +1549,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.2.4" watcher: dependency: transitive description: