diff --git a/README.md b/README.md index b40487484..18b5fd96c 100644 --- a/README.md +++ b/README.md @@ -255,16 +255,29 @@ After SDK Target 31 needs to be supported, and older plugins doesn't have the an Cordova-plugin-x-socialsharing `` +Fixing SocialSharing.java +` int flag = PendingIntent.FLAG_MUTABLE; +if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.S) { +flag = PendingIntent.FLAG_UPDATE_CURRENT; +} +final PendingIntent pendingIntent = PendingIntent.getBroadcast(cordova.getActivity().getApplicationContext(), 0, receiverIntent, flag);` +-> https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/pull/1202/commits + cordova-plugin-telerik-imagepicker -`` -fttx-phonegap-plugin-barcodescanner -`` +1. `` +2. ` + +` -> change edit-config to config-file + fttx-phonegap-plugin-barcodescanner + `` cordova-plugin-file/src/android ContentFileSystem.java -> Temp fix for import -` String encodedPath = inputURL.uri.getEncodedPath(); String authorityAndPath = encodedPath.substring(encodedPath.indexOf(this.name) + 1 + this.name.length() + 2);` +` String encodedPath = inputURL.uri.getEncodedPath(); +String authorityAndPath = encodedPath.substring(encodedPath.indexOf(this.name) + 1 + this.name.length() + 2);` -Fixing SocialSharing.java --> https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/pull/1202/commits +Compile deson't work on android? +Try: +`cordova build android -- --jvmargs='-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M" --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED'` diff --git a/config.xml b/config.xml index 0b8f1f28d..96d4d999f 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - + Beanconqueror Lars Saalbach diff --git a/package-lock.json b/package-lock.json index 01aa1c197..944f3f55f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -100,12 +100,13 @@ "cordova-plugin-androidx-adapter": "^1.1.3", "cordova-plugin-app-version": "^0.1.12", "cordova-plugin-apprate": "^1.7.2", - "cordova-plugin-ble-central": "^1.6.3", + "cordova-plugin-ble-central": "^1.7.0", "cordova-plugin-camera": "^6.0.0", "cordova-plugin-customurlscheme-ng": "^10.0.0", "cordova-plugin-dialogs": "^2.0.2", "cordova-plugin-file": "^7.0.0", "cordova-plugin-file-transfer": "github:dpa99c/cordova-plugin-file-transfer", + "cordova-plugin-filepath": "^1.6.0", "cordova-plugin-geolocation": "^4.1.0", "cordova-plugin-health": "^2.0.0", "cordova-plugin-inappbrowser": "^5.0.0", @@ -6417,9 +6418,9 @@ "dev": true }, "node_modules/cordova-plugin-ble-central": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/cordova-plugin-ble-central/-/cordova-plugin-ble-central-1.6.3.tgz", - "integrity": "sha512-de96U+74DMpjqtj4YgxhIHyUcX6egn1KyntAAgxiuxfndH4z0rYw2DU41DnC4C559zEnwaHq6YOxROu7+7BQrw==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/cordova-plugin-ble-central/-/cordova-plugin-ble-central-1.7.0.tgz", + "integrity": "sha512-yGjtQEjGREh/q1wDNAlD6KQsBYSwGgNUj2thzn4Alp5UmnDRJj5u2xGHbVMbxhiw3J7cOo+x39zUJjrOKOQA7Q==", "dev": true }, "node_modules/cordova-plugin-camera": { @@ -6537,6 +6538,13 @@ "resolved": "https://registry.npmjs.org/cordova-plugin-filechooser/-/cordova-plugin-filechooser-1.2.0.tgz", "integrity": "sha512-ycL9ML3wlRQ8wfK7vCG8gobv1f3VIdO52m0LA9mPSzLblbu0AXJs89yCRxZB87+08/V96qBxrmkxMsMmVYu5wA==" }, + "node_modules/cordova-plugin-filepath": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/cordova-plugin-filepath/-/cordova-plugin-filepath-1.6.0.tgz", + "integrity": "sha512-DwKuH5tXhZJImU/rHDzQhG3bY2ihAUw5QqdNllso96MZ9TQTAbFvKPLppuJwx21XxYS2g3uB9R17AXEEme+sKA==", + "deprecated": "No longer maintained", + "dev": true + }, "node_modules/cordova-plugin-filepicker": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/cordova-plugin-filepicker/-/cordova-plugin-filepicker-1.1.6.tgz", @@ -8556,8 +8564,8 @@ "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" }, "node_modules/fttx-phonegap-plugin-barcodescanner": { - "version": "8.2.10", - "resolved": "git+ssh://git@github.com/fttx/phonegap-plugin-barcodescanner.git#92d7e25631760f2db02e9fb42769d30b5ccc325f", + "version": "9.4.4", + "resolved": "git+ssh://git@github.com/fttx/phonegap-plugin-barcodescanner.git#d2448e31dda0240d6a8a4d305ca3d9ac8dbae0ae", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 11ccba171..6d65340b8 100644 --- a/package.json +++ b/package.json @@ -107,12 +107,13 @@ "cordova-plugin-androidx-adapter": "^1.1.3", "cordova-plugin-app-version": "^0.1.12", "cordova-plugin-apprate": "^1.7.2", - "cordova-plugin-ble-central": "^1.6.3", + "cordova-plugin-ble-central": "^1.7.0", "cordova-plugin-camera": "^6.0.0", "cordova-plugin-customurlscheme-ng": "^10.0.0", "cordova-plugin-dialogs": "^2.0.2", "cordova-plugin-file": "^7.0.0", "cordova-plugin-file-transfer": "github:dpa99c/cordova-plugin-file-transfer", + "cordova-plugin-filepath": "^1.6.0", "cordova-plugin-geolocation": "^4.1.0", "cordova-plugin-health": "^2.0.0", "cordova-plugin-inappbrowser": "^5.0.0", @@ -235,8 +236,8 @@ } }, "platforms": [ - "android", - "ios" + "ios", + "android" ] }, "platforms": [ @@ -251,4 +252,4 @@ "*.css": "stylelint --fix", "*.{ts,js,css,md}": "prettier --write" } -} +} \ No newline at end of file diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 5d4afc7e3..7bac24e09 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -713,13 +713,13 @@ export class AppComponent implements AfterViewInit { if (pressure_id && isAndroidAndPressureDevice === false) { searchIds.push(pressure_id); } - if (temperature_id) { + if (temperature_id && !this.platform.is('android')) { searchIds.push(temperature_id); } try { if (searchIds.length > 0) { - //Just search if we raly got id's - this.bleManager.findDeviceWithDirectIds(searchIds, 60000); + // Just search if we raly got id's + await this.bleManager.findDeviceWithDirectIds(searchIds, 8000); } } catch (ex) {} } diff --git a/src/app/app.scss b/src/app/app.scss index f2d072dbb..a212717f6 100644 --- a/src/app/app.scss +++ b/src/app/app.scss @@ -861,11 +861,21 @@ ion-segment.tabs { padding-top:0px; ion-segment-button{ - width: 100%; + width: 100%; .value{ font-size: 14px; opacity: 0.8; } } -} \ No newline at end of file +} + +.xenia-script-chooser { + max-width:100%; + width:100%; + .alert-wrapper { + max-width:100%; + width:90%; + + } +} diff --git a/src/app/brew/brew-detail/brew-detail.component.html b/src/app/brew/brew-detail/brew-detail.component.html index 1e68ce2cb..05d1008c2 100644 --- a/src/app/brew/brew-detail/brew-detail.component.html +++ b/src/app/brew/brew-detail/brew-detail.component.html @@ -362,7 +362,7 @@

{{data.coffee_concentration}}

data.getPreparation().use_custom_parameters)">

{{"BREW_DATA_RATING" | translate }}:

-

{{data.rating}}

+

{{data.rating | number : '.0-2'}}

diff --git a/src/app/brew/brew-detail/brew-detail.component.ts b/src/app/brew/brew-detail/brew-detail.component.ts index de2419e0f..351ce6846 100644 --- a/src/app/brew/brew-detail/brew-detail.component.ts +++ b/src/app/brew/brew-detail/brew-detail.component.ts @@ -96,7 +96,7 @@ export class BrewDetailComponent implements OnInit { // Set timeout else element wont be visible setTimeout(() => { this.__loadCuppingChart(); - }, 150); + }, 1000); } await this.readFlowProfile(); @@ -464,15 +464,34 @@ export class BrewDetailComponent implements OnInit { 'image/jpeg', 1 );*/ - Plotly.Snapshot.toImage(document.getElementById('flowProfileChart'), { - format: 'jpeg', - }).once('success', async (url) => { - try { - this.socialSharing.share(null, null, url, null); - } catch (err) { - this.uiLog.error('Cant share profilechart ' + err.message); - } - }); + if (this.platform.is('ios')) { + //#544 - we need to do it twice... don't know why, ios issue + Plotly.Snapshot.toImage(document.getElementById('flowProfileChart'), { + format: 'jpeg', + }).once('success', async (url) => { + setTimeout(() => { + Plotly.Snapshot.toImage(document.getElementById('flowProfileChart'), { + format: 'jpeg', + }).once('success', async (urlNew) => { + try { + this.socialSharing.share(null, null, urlNew, null); + } catch (err) { + this.uiLog.error('Cant share profilechart ' + err.message); + } + }); + }, 750); + }); + } else { + Plotly.Snapshot.toImage(document.getElementById('flowProfileChart'), { + format: 'jpeg', + }).once('success', async (url) => { + try { + this.socialSharing.share(null, null, url, null); + } catch (err) { + this.uiLog.error('Cant share profilechart ' + err.message); + } + }); + } } private getChartLayout() { diff --git a/src/app/settings/settings.page.html b/src/app/settings/settings.page.html index 513d8660a..d78685993 100644 --- a/src/app/settings/settings.page.html +++ b/src/app/settings/settings.page.html @@ -404,6 +404,20 @@

{{"SMART_SCALE_COMMAND_DELAY" | translate}}

{{settings.bluetooth_command_delay}} ms + + + +

{{"SMART_SCALE_ACAIA_HEARTBEAT_TIMER" | translate}}

+
+ +
+ + + {{settings.acaia_heartbeat_command_delay}} ms + +

{{"SMART_SCALE_LOG" | translate}}

diff --git a/src/app/settings/settings.page.ts b/src/app/settings/settings.page.ts index 26d491889..4343817e2 100644 --- a/src/app/settings/settings.page.ts +++ b/src/app/settings/settings.page.ts @@ -790,8 +790,9 @@ export class SettingsPage implements OnInit { this.uiStorage.export().then( (_data) => { + const isIOS = this.platform.is('ios'); this.uiHelper - .exportJSON('Beanconqueror.json', JSON.stringify(_data)) + .exportJSON('Beanconqueror.json', JSON.stringify(_data), isIOS) .then( async (_fileEntry: FileEntry) => { if (this.platform.is('cordova')) { diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json index 9aea5d55a..962029ec9 100644 --- a/src/assets/i18n/de.json +++ b/src/assets/i18n/de.json @@ -862,6 +862,13 @@ "Sonstiges:", "Kleinere Fehlerbehebungen" ] + }, + "6.4.10": { + "TITLE": "Version 6.4.1: Das ist neu", + "DESCRIPTION": [ + "Sonstiges:", + "Kleinere Fehlerbehebungen" + ] } }, "CUSTOM_PARAMETERS": "Parameter individualisieren", @@ -1460,5 +1467,7 @@ "BREW_TEMPERATURE_REALTIME": "Temperatur", "PAGE_SETTINGS_TAB_BLUETOOTH_TEMPERATURE": "Temperaturgerät", "PRESSURE_DEVICE_JUST_VISIBLE_ON_ESPRESSO": "Druckgerät ist nur Verwendbar bei Zubereitungsmethoden der Zubereitungsart 'Espresso'", - "PRESSURE_MESSAGE_AFTER_CONNECTION": "Bekanntes Verhalten (in Analyse): Bitte beachte, dass der Verbindungsaufbau nach dem Neustart deines Telefons oder nach längerer Zeit, ohne, dass die App verwendet worden ist, auch länger dauern kann (30 Sekunden bis 1 Minute) danach sollte das Problem nicht mehr auftreten. " + "PRESSURE_MESSAGE_AFTER_CONNECTION": "Bekanntes Verhalten (in Analyse): Bitte beachte, dass der Verbindungsaufbau nach dem Neustart deines Telefons oder nach längerer Zeit, ohne, dass die App verwendet worden ist, auch länger dauern kann (30 Sekunden bis 1 Minute) danach sollte das Problem nicht mehr auftreten. ", + "SMART_SCALE_ACAIA_HEARTBEAT_TIMER": "Heartbeat timer - Nur Acaia Waagen!", + "SMART_SCALE_ACAIA_HEARTBEAT_TIMER_TOOLTIP": "Wird nur für Acaia Waagen verwendet!!! Alte Acaia Wagen benötigen ein Heartbeat timer, falls du Probleme mit der Waage hast, versuch die Zeit zu minimieren " } diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index b3a5307e6..5a7c0e00e 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -862,6 +862,13 @@ "Others:", "Small bug fixes" ] + }, + "6.4.10": { + "TITLE": "Version 6.4.1: What's new?", + "DESCRIPTION": [ + "Others:", + "Small bug fixes" + ] } }, "CUSTOM_PARAMETERS": "Customize parameters", @@ -1460,5 +1467,7 @@ }, "POPOVER_BLUETOOTH_ACTION_RECONNECT_TEMPERATURE_DEVICE": "Reconnect temperature device", "PRESSURE_DEVICE_JUST_VISIBLE_ON_ESPRESSO": "Pressure device is only usable with the preparation style 'Espresso'", - "PRESSURE_MESSAGE_AFTER_CONNECTION": "Known Behavior (in analyse): Note, that after restarting your phone or when not using the app for a long time, the connection can take longer (30 seconds to 1 minute), after that time elapses the connection issue should be resolved." -} \ No newline at end of file + "PRESSURE_MESSAGE_AFTER_CONNECTION": "Known Behavior (in analyse): Note, that after restarting your phone or when not using the app for a long time, the connection can take longer (30 seconds to 1 minute), after that time elapses the connection issue should be resolved.", + "SMART_SCALE_ACAIA_HEARTBEAT_TIMER": "Heartbeat timer - Just for Acaia Scales", + "SMART_SCALE_ACAIA_HEARTBEAT_TIMER_TOOLTIP": "Just used for Acaia scales!!! - Older Acaia scales need an heartbeat, if you encounter issues, try to minimize the heartbeat to a faster frequence" +} diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json index 38818d6c4..530770ed3 100644 --- a/src/assets/i18n/es.json +++ b/src/assets/i18n/es.json @@ -862,6 +862,13 @@ "Otros", "Corrección de errores menores" ] + }, + "6.4.10": { + "TITLE": "Versión 6.4.1: Novedades", + "DESCRIPTION": [ + "Otros", + "Corrección de errores menores" + ] } }, "CUSTOM_PARAMETERS": "Personalizar parámetros", @@ -1460,5 +1467,7 @@ "PRESSURE_DEVICE_JUST_VISIBLE_ON_ESPRESSO": "El sensor de presión solo se puede usar en espresso", "PRESSURE_MESSAGE_AFTER_CONNECTION": "Comportamiento conocido (en estudio): tenga en cuenta que tras reiniciar su teléfono o tras no usar la aplicación durante un tiempo, la conexión puede llevar más tiempo del habitual (de 30 segundos a 1 minutos). Tras eso, el comportamiento debería el habitual.", "BREW_TEMPERATURE_REALTIME": "Temperatura", - "PAGE_SETTINGS_TAB_BLUETOOTH_TEMPERATURE": "Sensor de temperatura" + "PAGE_SETTINGS_TAB_BLUETOOTH_TEMPERATURE": "Sensor de temperatura", + "SMART_SCALE_ACAIA_HEARTBEAT_TIMER": "Heartbeat timer - Just for Acaia Scales", + "SMART_SCALE_ACAIA_HEARTBEAT_TIMER_TOOLTIP": "Just used for Acaia scales!!! - Older Acaia scales need an heartbeat, if you encounter issues, try to minimize the heartbeat to a faster frequence" } diff --git a/src/assets/i18n/tr.json b/src/assets/i18n/tr.json index c40973717..b72010aaa 100644 --- a/src/assets/i18n/tr.json +++ b/src/assets/i18n/tr.json @@ -862,6 +862,13 @@ "Diğerleri:", "Daha küçük hata düzeltmeleri" ] + }, + "6.4.10": { + "TITLE": "Version 6.4.1: Neler yeni?", + "DESCRIPTION": [ + "Diğerleri:", + "Daha küçük hata düzeltmeleri" + ] } }, "CUSTOM_PARAMETERS": "Parametreyi özelleştir", @@ -1460,5 +1467,7 @@ "PRESSURE_DEVICE_JUST_VISIBLE_ON_ESPRESSO": "Basınç cihazı sadece 'espresso' hazırlama stilinde kullanılabilir", "PRESSURE_MESSAGE_AFTER_CONNECTION": "Bilinen davranış (analizde): Lütfen dikkat edin, telefonunuzu yeniden başlattıktan veya uygulamayı uzun süre kullanmadıysanız, bağlantı daha uzun sürebilir (30 saniye ila 1 dakika), sonra sorun çözülmelidir.", "BREW_TEMPERATURE_REALTIME": "Sıcaklık", - "PAGE_SETTINGS_TAB_BLUETOOTH_TEMPERATURE": "Termometre" + "PAGE_SETTINGS_TAB_BLUETOOTH_TEMPERATURE": "Termometre", + "SMART_SCALE_ACAIA_HEARTBEAT_TIMER": "Heartbeat timer - Just for Acaia Scales", + "SMART_SCALE_ACAIA_HEARTBEAT_TIMER_TOOLTIP": "Just used for Acaia scales!!! - Older Acaia scales need an heartbeat, if you encounter issues, try to minimize the heartbeat to a faster frequence" } diff --git a/src/assets/i18n/zh.json b/src/assets/i18n/zh.json index bc8cf0fbf..6db1cc74f 100644 --- a/src/assets/i18n/zh.json +++ b/src/assets/i18n/zh.json @@ -861,6 +861,13 @@ "其他:", "修复了一些小错误" ] + }, + "6.4.10": { + "TITLE": "版本 6.4.1: 更新内容", + "DESCRIPTION": [ + "其他:", + "修复了一些小错误" + ] } }, "CUSTOM_PARAMETERS": "自定义参数", @@ -1459,5 +1466,7 @@ "PRESSURE_DEVICE_JUST_VISIBLE_ON_ESPRESSO": "压力设备仅在 'espresso' 模式中可用", "PRESSURE_MESSAGE_AFTER_CONNECTION": "已知行为 (在分析中): 请注意, 如果您重启手机或长时间未使用应用程序, 则连接可能需要更长时间 (30 秒至 1 分钟) ", "BREW_TEMPERATURE_REALTIME": "温度", - "PAGE_SETTINGS_TAB_BLUETOOTH_TEMPERATURE": "温度设备" + "PAGE_SETTINGS_TAB_BLUETOOTH_TEMPERATURE": "温度设备", + "SMART_SCALE_ACAIA_HEARTBEAT_TIMER": "Heartbeat timer - Just for Acaia Scales", + "SMART_SCALE_ACAIA_HEARTBEAT_TIMER_TOOLTIP": "Just used for Acaia scales!!! - Older Acaia scales need an heartbeat, if you encounter issues, try to minimize the heartbeat to a faster frequence" } diff --git a/src/classes/devices/acaia/acaia.ts b/src/classes/devices/acaia/acaia.ts index ddc09609d..87adf2533 100644 --- a/src/classes/devices/acaia/acaia.ts +++ b/src/classes/devices/acaia/acaia.ts @@ -22,6 +22,7 @@ import { Logger } from '../common/logger'; import { DEBUG } from '../common/constants'; import { to128bitUUID } from '../common/util'; import { Decoder } from './decoder'; +import { UISettingsStorage } from '../../../services/uiSettingsStorage'; declare var window: any; declare var device: any; @@ -90,7 +91,7 @@ class DecoderWorker { } } -const HEARTBEAT_INTERVAL = 400; +let HEARTBEAT_INTERVAL = 1000; export class AcaiaScale { private readonly device_id: string; @@ -136,6 +137,12 @@ export class AcaiaScale { this.logger = new Logger(); + try { + // #548 + const uiSettingsStorage = UISettingsStorage.getInstance(); + const settingsInst = uiSettingsStorage.getSettings(); + HEARTBEAT_INTERVAL = settingsInst.acaia_heartbeat_command_delay; + } catch (ex) {} // TODO(mike1808): make it to work with new Lunar and Pyxis by auto-detecting service and char uuid this.logger.info( 'received characteristics: ', diff --git a/src/classes/settings/settings.ts b/src/classes/settings/settings.ts index 339daa81e..c036a3d2a 100755 --- a/src/classes/settings/settings.ts +++ b/src/classes/settings/settings.ts @@ -105,6 +105,7 @@ export class Settings implements ISettings { public bluetooth_ignore_negative_values: boolean; public bluetooth_ignore_anomaly_values: boolean; public bluetooth_command_delay: number; + public acaia_heartbeat_command_delay: number; public pressure_id: string; public pressure_type: PressureType; @@ -279,6 +280,7 @@ export class Settings implements ISettings { this.bluetooth_ignore_negative_values = false; this.bluetooth_ignore_anomaly_values = false; this.bluetooth_command_delay = 50; + this.acaia_heartbeat_command_delay = 1000; this.scale_log = false; diff --git a/src/classes/version/iVersion.ts b/src/classes/version/iVersion.ts index c48d9e7d5..2699336fe 100755 --- a/src/classes/version/iVersion.ts +++ b/src/classes/version/iVersion.ts @@ -72,6 +72,7 @@ export class Version implements IVersion { '6.2.0', '6.3.0', '6.4.0', + '6.4.10', ]; } diff --git a/src/components/beans/bean-sort-information/bean-sort-information.component.ts b/src/components/beans/bean-sort-information/bean-sort-information.component.ts index 54d300999..f96a6565e 100644 --- a/src/components/beans/bean-sort-information/bean-sort-information.component.ts +++ b/src/components/beans/bean-sort-information/bean-sort-information.component.ts @@ -9,6 +9,7 @@ import { UIHelper } from '../../../services/uiHelper'; import { UIBeanHelper } from '../../../services/uiBeanHelper'; import { UIBeanStorage } from '../../../services/uiBeanStorage'; import { BeanInformation } from '../../../generated/src/classes/bean/bean'; +import { distinct } from 'rxjs/operators'; @Component({ selector: 'bean-sort-information', @@ -80,14 +81,25 @@ export class BeanSortInformationComponent implements OnInit { for (const beanInfoEntry of beanInfoList) { if (beanInfoEntry && beanInfoEntry.hasOwnProperty(_type)) { const splittedInfos = beanInfoEntry[_type].split(/(?:,|; )+/); - this.typeaheadSearch[_type + 'Results'].push(...splittedInfos); + const filterSplittedInfos = splittedInfos.filter((be) => { + return be.toLowerCase().includes(actualSearchValue); + }); + + this.typeaheadSearch[_type + 'Results'].push( + ...new Set(filterSplittedInfos) + ); } } } + + const distictedValues = []; + this.typeaheadSearch[_type + 'Results'].forEach((element) => { + if (!distictedValues.includes(element.trim())) { + distictedValues.push(element.trim()); + } + }); // Distinct values - this.typeaheadSearch[_type + 'Results'] = Array.from( - new Set(this.typeaheadSearch[_type + 'Results'].map((e) => e)) - ); + this.typeaheadSearch[_type + 'Results'] = distictedValues; if (this.typeaheadSearch[_type + 'Results'].length > 0) { this.typeaheadSearch[_type + 'ResultsAvailable'] = true; diff --git a/src/components/brews/brew-brewing/brew-brewing.component.html b/src/components/brews/brew-brewing/brew-brewing.component.html index 0a2a87d1d..7948e68ef 100644 --- a/src/components/brews/brew-brewing/brew-brewing.component.html +++ b/src/components/brews/brew-brewing/brew-brewing.component.html @@ -208,7 +208,7 @@
{{"PREPARATION_DEVICE.TYPE_XENIA.PRESS_START_SCRIPT" | translate}} - {{"PREPARATION_DEVICE.TYPE_XENIA.SCRIPT_LIST_GENERAL_0" | translate}} @@ -229,7 +229,7 @@ data.getPreparation().manage_parameters.coffee_first_drip_time, data.getPreparation().use_custom_parameters) && getPreparation().style_type === PREPARATION_STYLE_TYPE.ESPRESSO))"> {{"PREPARATION_DEVICE.TYPE_XENIA.FIRST_DRIP_SCRIPT" | translate}} - {{"PREPARATION_DEVICE.TYPE_XENIA.SCRIPT_LIST_GENERAL_0" | translate}} @@ -252,7 +252,7 @@ {{"PREPARATION_DEVICE.TYPE_XENIA.CHOOSE_SCRIPT_AT_WEIGHT" | translate}} - {{"PREPARATION_DEVICE.TYPE_XENIA.SCRIPT_LIST_GENERAL_STOP" | translate}} diff --git a/src/components/brews/brew-brewing/brew-brewing.component.scss b/src/components/brews/brew-brewing/brew-brewing.component.scss index 480541e84..f83d712c9 100644 --- a/src/components/brews/brew-brewing/brew-brewing.component.scss +++ b/src/components/brews/brew-brewing/brew-brewing.component.scss @@ -130,4 +130,5 @@ } -} \ No newline at end of file +} + diff --git a/src/components/brews/brew-brewing/brew-brewing.component.ts b/src/components/brews/brew-brewing/brew-brewing.component.ts index 28c014989..a610e662e 100644 --- a/src/components/brews/brew-brewing/brew-brewing.component.ts +++ b/src/components/brews/brew-brewing/brew-brewing.component.ts @@ -164,6 +164,10 @@ export class BrewBrewingComponent implements OnInit, AfterViewInit { private pressureThresholdWasHit: boolean = false; private temperatureThresholdWasHit: boolean = false; + public customXeniaOptions = { + cssClass: 'xenia-script-chooser', + }; + constructor( private readonly platform: Platform, private readonly uiSettingsStorage: UISettingsStorage, @@ -1197,6 +1201,8 @@ export class BrewBrewingComponent implements OnInit, AfterViewInit { this.deattachToWeightChange(); this.deattachToFlowChange(); + // 551 - Always attach to flow change, even when reset is triggerd + this.attachToFlowChange(); } if (pressureDevice) { @@ -2812,14 +2818,7 @@ export class BrewBrewingComponent implements OnInit, AfterViewInit { for (let i = this.weightTrace.y.length - 1; i >= 0; i--) { const dataVal = this.weightTrace.y[i]; if (dataVal !== null) { - if ( - this.settings.bluetooth_ignore_negative_values === true && - dataVal?.y > 0 - ) { - lastFoundRightValue = dataVal.y; - } else { - } - + lastFoundRightValue = dataVal; break; } } diff --git a/src/components/cupping-radar/cupping-radar.component.html b/src/components/cupping-radar/cupping-radar.component.html index 53e2eb5d3..41640aa9c 100644 --- a/src/components/cupping-radar/cupping-radar.component.html +++ b/src/components/cupping-radar/cupping-radar.component.html @@ -2,7 +2,7 @@
-
{{"CUPPING_SCORE_CUPPERS_CORRECTION" | translate}} {{ this.model.cuppers_correction}}
+
{{"CUPPING_SCORE_CUPPERS_CORRECTION" | translate}} {{ this.model.cuppers_correction| number : '.1-1'}}
{{"CUPPING_SCORE" | translate}}: {{getScore()| number : '.1-1'}}
{ this.logger.log('AutoConnectScale - Scale device connected.'); this.connectCallback(deviceType, data); successCallback(); }, - () => { + async () => { this.logger.log('AutoConnectScale - Scale device disconnected.'); this.disconnectCallback(); errorCallback(); + + const settings = this.uiStettingsStorage.getSettings(); + if (settings.scale_id && settings.scale_id === deviceId) { + if (device !== null && device.platform === 'Android') { + await this.findDeviceWithDirectId(deviceId, 6000); + // Give it a short delay before reconnect + await new Promise((resolve) => { + setTimeout(async () => { + resolve(undefined); + }, 500); + }); + } + // as long as the pressure id is known, and the device id is still the same try to reconnect. + this.autoConnectScale( + deviceType, + deviceId, + _scanForDevices, + successCallback, + errorCallback, + _timeout + ); + } } ); } catch (ex) {} diff --git a/src/services/uiAlert.ts b/src/services/uiAlert.ts index e55070d6d..63fd8e09f 100755 --- a/src/services/uiAlert.ts +++ b/src/services/uiAlert.ts @@ -21,39 +21,44 @@ export class UIAlert { private readonly loadingController: LoadingController ) {} - private loadingSpinner; + private existingLoadingSpinners = []; public async showLoadingSpinner( message: string = 'PLEASE_WAIT', translate: boolean = true ) { - if (this.loadingSpinner) { + if (this.existingLoadingSpinners.length > 0) { await this.hideLoadingSpinner(); } let msg = message; if (translate) { msg = this.translate.instant(message); } - this.loadingSpinner = await this.loadingController.create({ + const loadingSpinner = await this.loadingController.create({ message: msg, }); - this.loadingSpinner.present(); + this.existingLoadingSpinners.push(loadingSpinner); + loadingSpinner.present(); } public setLoadingSpinnerMessage(message: string, translate: boolean = false) { - if (this.loadingSpinner) { - if (translate === false) { - this.loadingSpinner.message = message; - } else { - this.loadingSpinner.message = this.translate.instant(message); + if (this.existingLoadingSpinners.length > 0) { + for (const spinner of this.existingLoadingSpinners) { + if (translate === false) { + spinner.message = message; + } else { + spinner.message = this.translate.instant(message); + } } } } public async hideLoadingSpinner() { - if (this.loadingSpinner) { - await this.loadingSpinner.dismiss(); - this.loadingSpinner = undefined; + if (this.existingLoadingSpinners.length > 0) { + for (const spinner of this.existingLoadingSpinners) { + spinner.dismiss(); + } + this.existingLoadingSpinners = []; } } diff --git a/src/services/uiUpdate.ts b/src/services/uiUpdate.ts index 6e567a27a..3ac8cb8ab 100755 --- a/src/services/uiUpdate.ts +++ b/src/services/uiUpdate.ts @@ -573,7 +573,7 @@ export class UIUpdate { versionCode = await this.appVersion.getVersionNumber(); } else { // Hardcored for testing - versionCode = '6.4.0'; + versionCode = '6.4.10'; } const version: Version = this.uiVersionStorage.getVersion(); const displayingVersions =