-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt at code simplification #923
Conversation
@@ -58,103 +59,74 @@ const CURRENT_TERMS_VERSION = 1 | |||
const IS_PLAY_VERSION = "playVersion" | |||
const SET_SELECTED_TAB = "/selectedTab" | |||
|
|||
// All method names | |||
// this expose to client IOS & Andorid | |||
const SESSION_MODEL_METHOD_INIT_MODEL = "initSesssionModel" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oxtoacart Any reason why we are not using const here? I think we were using the same const on the IOS end to have method name consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in the process of getting rid of those calls from iOS. When the Swift code calls Go, it's cleaner just to expose an actual method rather than trying to call through InvokeMethod
. Once that's done, there's no need for these to be constants since the only remaining place they're used is Dart, which doesn't have access to our Go constants anyway. And I think it makes the Go code more readable to just have the strings right inside of the switch statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explaining. I got it.
I'm going to go ahead and merge this. |
No description provided.