mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-08-01 17:38:40 +00:00
Comments & Dictionaries
Reformatted comments to work in VSCode and converted `dict.get(:key)` to `dict[:key]` syntax as its nicer.
This commit is contained in:
@ -83,16 +83,16 @@ class PinDigit extends WatchUi.Selectable {
|
||||
//! Class Constructor
|
||||
//!
|
||||
//! @param options See `Drawable.initialize()`, but with `:label` and `:touched` added.<br>
|
||||
//! {<br>
|
||||
//!   :label as Lang.Number, // The digit 0..9 to display<br>
|
||||
//!   :touched as Lang.Boolean, // Should the digit be filled to indicate it has been pressed?<br>
|
||||
//! `{`<br>
|
||||
//!   `:label as Lang.Number,` // The digit 0..9 to display<br>
|
||||
//!   `:touched as Lang.Boolean,` // Should the digit be filled to indicate it has been pressed?<br>
|
||||
//!   + those required by `Drawable.initialize()`<br>
|
||||
//! }
|
||||
//! ``}`
|
||||
//
|
||||
function initialize(options) {
|
||||
Drawable.initialize(options);
|
||||
mText = options.get(:label);
|
||||
mTouched = options.get(:touched);
|
||||
mText = options[:label];
|
||||
mTouched = options[:touched];
|
||||
}
|
||||
|
||||
//! Draw the PIN digit button.
|
||||
@ -182,10 +182,10 @@ class HomeAssistantPinConfirmationDelegate extends WatchUi.BehaviorDelegate {
|
||||
private var mPin as Lang.String;
|
||||
private var mEnteredPin as Lang.String;
|
||||
private var mConfirmMethod as Method(state as Lang.Boolean) as Void;
|
||||
private var mTimer as Timer.Timer or Null;
|
||||
private var mTimer as Timer.Timer?;
|
||||
private var mState as Lang.Boolean;
|
||||
private var mFailures as PinFailures;
|
||||
private var mToggleMethod as Method(state as Lang.Boolean) as Void or Null;
|
||||
private var mToggleMethod as Method(state as Lang.Boolean) as Void?;
|
||||
private var mView as HomeAssistantPinConfirmationView;
|
||||
|
||||
//! Class Constructor
|
||||
@ -202,7 +202,7 @@ class HomeAssistantPinConfirmationDelegate extends WatchUi.BehaviorDelegate {
|
||||
:pin as Lang.String,
|
||||
:state as Lang.Boolean,
|
||||
:view as HomeAssistantPinConfirmationView,
|
||||
:toggleMethod as (Method(state as Lang.Boolean) as Void) or Null,
|
||||
:toggleMethod as (Method(state as Lang.Boolean) as Void)?,
|
||||
}) {
|
||||
BehaviorDelegate.initialize();
|
||||
mFailures = new PinFailures();
|
||||
@ -334,7 +334,7 @@ class PinFailures {
|
||||
const STORAGE_KEY_LOCKED as Lang.String = "pin_locked";
|
||||
|
||||
private var mFailures as Lang.Array<Lang.Number>;
|
||||
private var mLockedUntil as Lang.Number or Null;
|
||||
private var mLockedUntil as Lang.Number?;
|
||||
|
||||
//! Class Constructor
|
||||
//
|
||||
|
Reference in New Issue
Block a user