-
Notifications
You must be signed in to change notification settings - Fork 0
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
For review with Android #90
base: for-review
Are you sure you want to change the base?
Conversation
On branch MR-1-user
On branch MR-1-user
1. User creation test 2. Identifier creation test On branch MR-1-user
On branch MR-1-user
On branch MR-1-user
On branch MR-1-user
6-digit verification code generation by means of Apache Commons Lang On branch MR-1-user
On branch MR-1-user
On branch MR-1-user
On branch MR-1-user
On branch MR-1-user
On branch MR-4-session
On branch MR-4-session
The library provides multiplatform support of date/time classes On branch MR-4-session
On branch MR-4-session
On branch MR-4-session
On branch MR-4-session
On branch MR-4-session
On branch MR-4-session
Use Mockito (v3.6) to mock static method of Clock class so as to have the ability to change system time On branch MR-4-session
On branch MR-1-user
On branch MR-1-user
* Configure website deployment * Add Production, Build and Deploy sections to README * Make FCM initialization optional (for local/debug envs) * Fix Build section of README * Add 'Development with IntelliJ IDEA' section to README
val name: String, | ||
val type: String, | ||
) { | ||
fun url(): String = "http://${Server.host}:${Server.port}/attachments/$objectId/$name" |
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.
fun -> val
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.
Так можно сделать, если сконфигурировать ktor client deserializer, чтобы он игнорировал поле url (потому что оно не в конструкторе). Иначе возникают ошибки, то в android, то в ios...
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.
Тогда можно сделать extension val ;)
shared/src/commonMain/kotlin/org/itmodreamteam/myrest/shared/error/ServerError.kt
Show resolved
Hide resolved
shared/src/commonMain/kotlin/org/itmodreamteam/myrest/shared/messaging/MessagingClient.kt
Show resolved
Hide resolved
shared/src/commonMain/kotlin/org/itmodreamteam/myrest/shared/messaging/MessagingClientImpl.kt
Show resolved
Hide resolved
shared/src/commonMain/kotlin/org/itmodreamteam/myrest/shared/messaging/NotificationClient.kt
Show resolved
Hide resolved
private val restaurantClient: RestaurantClient | ||
) : ViewModel() { | ||
private val _restaurants = MutableLiveData<List<RestaurantInfo>>() | ||
val restaurants: LiveData<List<RestaurantInfo>> = _restaurants |
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.
Класс, что так делаешь!
val search = restaurantClient.search(keyword, Pageable(0, 10)) | ||
// TODO debug x4 | ||
val test = mutableListOf<RestaurantInfo>() | ||
for (i in (0..3)) { |
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.
Скобки лишние
import dagger.hilt.android.HiltAndroidApp | ||
|
||
@HiltAndroidApp | ||
class MyRestApplication : Application() { |
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.
{} не нужны
private fun getMyRestaurants() = GlobalScope.launch { | ||
try { | ||
val restaurants = props.restaurantClient.getRestaurantsOfUser() | ||
setState(State(state.me, restaurants)) |
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.
state.copy(restaurants = restaurants)
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.
Насколько я знаю, в kotlin-react больше любят делать state интерфейсом и проперти var, чтобы тут вызывать setState { restaurants = restaurants }
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.
Да, так было бы лучше
class SignInComponent(props: Props) : RComponent<SignInComponent.Props, SignInComponent.State>(props) { | ||
|
||
init { | ||
state = State(null) |
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.
Я думаю, так не очень хорошо делать, лучше использовать state который предоставляет родитель
* Add getById method for RestaurantClient * Disable auth for public method
* Add ability to update profile * Fix tests
Add skeleton of sign up activity Add manual dependency injection Auto upgrade of gradle dependencies
Add DI using hilt Enable data binding Fix java versions (hilt doesn't work with 11) Add some dummy fragments
Add toolbar Add material components Set theme to NoActionBar (to see the back icon?)
Implement auto-recovering session logic Remove old activities from manifest
Add profile view Remove obsolete debug search activities Auto-move to restaurant search if user is signed in
Refresh session Add stub navigation
Add assisted DI support
Fix singletons Dynamic menu depending on global employee mode
Implement logout Setup navigation root destinations
Remove signUp fragment Add ability to change profile data Global timer for signIn action
7223733
to
1987be2
Compare
Remove urls when it's not needed
Add info about table to reservation card
In addition to all the code as in #89, this PR contains the latest android module code, though the checks fail