-
Notifications
You must be signed in to change notification settings - Fork 0
BasicAlertDialog実装 (テストなし) #26
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
base: v-tnta/main
Are you sure you want to change the base?
Conversation
mkeeda
left a comment
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.
ぱっと目についたところだけコメントしました!
.../main/java/com/cybozu/sample/kintone/spaces/data/space/entity/CommentMessageForThreadBody.kt
Show resolved
Hide resolved
...src/main/java/com/cybozu/sample/kintone/spaces/feature/communicate/thread/ThreadViewModel.kt
Show resolved
Hide resolved
| val isError: Boolean = false, | ||
| val isRefreshing: Boolean = false, | ||
| val isPosting: Boolean = false, | ||
| val isPostError: Boolean = false, |
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.
このままだと機能が増えるたびにエラーのフラグが増えていってしまうので、エラー状態の表現方法を工夫したほうがこの先コードが書きやすそうです。
例えば、enumやsealed class/interfaceで別のエラー型を作るとか?
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.
memo: 改善案
sealed classでExceptionを継承したエラーハンドリング専用のクラスや、状態を表現するクラスを作り、それを適応する
戻り値で状態、エラーを表現する
最後の悪あがきです笑
よろしくお願いいたします。