-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I have a problem with Pin, when use it in my class Application with OkHttp interceptor.
- Everytime my application calling request and need a
tokenwhere I'm saving it with Pin. - When i change token from another class, the variable
tokenin my classApplicationdoesn't get update, it like just normal variable. - I'm trying to debug my application and suggest this the problem why Pin never update my
tokenin classApplication. - When I remove
isRead = truefrom this code, My application run with properly.
Pin/pin/src/main/java/com/bael/pin/type/PinNonNull.kt
Lines 21 to 27 in afce839
override fun getValue(thisRef: Any, property: KProperty<*>): T { if (!isRead) { bufferValue = readPin(property) isRead = true } return bufferValue }
Pin/pin/src/main/java/com/bael/pin/type/PinNullable.kt
Lines 21 to 27 in afce839
| override fun getValue(thisRef: Any, property: KProperty<*>): T? { | |
| if (!isRead) { | |
| bufferValue = readPin(property) | |
| isRead = true | |
| } | |
| return bufferValue | |
| } |
- I know you want cut the time cost from read SharedPreference but in My case, I need it without
isRead = true. - Maybe you can fix it and update with optional paratemer
isRereador otherway.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels