File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
interfaces/src/main/kotlin/com/noxcrew/interfaces/properties Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public abstract class LazyProperty<T : Any>(
52
52
public abstract suspend fun load (reload : Boolean = true): T
53
53
54
54
/* * Initializes this property if it hasn't already. */
55
- public suspend fun initialize (view : InterfaceView ? = null ) {
55
+ public suspend fun initialize (view : InterfaceView ? ) {
56
56
if (! initialized || value == null ) {
57
57
reevaluate(reload = ! initialized, view = view)
58
58
}
@@ -63,10 +63,10 @@ public abstract class LazyProperty<T : Any>(
63
63
* If [reload] is given, all data should be fully reloaded.
64
64
*/
65
65
public suspend fun reevaluate (
66
+ view : InterfaceView ? ,
66
67
reload : Boolean = true,
67
68
trigger : Boolean = true,
68
69
debounce : Duration = 200.milliseconds,
69
- view : InterfaceView ? = null
70
70
): T {
71
71
// Mark down if we want an update to happen
72
72
if (trigger) {
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public abstract class StateProperty(
39
39
private var initialized: Boolean = false
40
40
41
41
/* * Initializes this property if it hasn't already. */
42
- public suspend fun initialize (view : InterfaceView ? = null ) {
42
+ public suspend fun initialize (view : InterfaceView ? ) {
43
43
if (! initialized) {
44
44
refresh(view = view)
45
45
}
@@ -49,7 +49,7 @@ public abstract class StateProperty(
49
49
* Refreshes this property, updating before triggering the state.
50
50
* Ignored if last refresh was within [debounce].
51
51
*/
52
- public suspend fun refresh (debounce : Duration = 200.milliseconds, view : InterfaceView ? = null ) {
52
+ public suspend fun refresh (debounce : Duration = 200.milliseconds, view : InterfaceView ? ) {
53
53
// Await any existing job if one is running
54
54
if (updateJob != null ) {
55
55
updateJob?.await()
You can’t perform that action at this time.
0 commit comments