Skip to content

Conversation

@v-tnta
Copy link

@v-tnta v-tnta commented Aug 22, 2025

最後の悪あがきです笑
よろしくお願いいたします。

Copy link
Collaborator

@mkeeda mkeeda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ぱっと目についたところだけコメントしました!

Comment on lines +8 to +11
val isError: Boolean = false,
val isRefreshing: Boolean = false,
val isPosting: Boolean = false,
val isPostError: Boolean = false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このままだと機能が増えるたびにエラーのフラグが増えていってしまうので、エラー状態の表現方法を工夫したほうがこの先コードが書きやすそうです。
例えば、enumやsealed class/interfaceで別のエラー型を作るとか?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memo: 改善案
sealed classでExceptionを継承したエラーハンドリング専用のクラスや、状態を表現するクラスを作り、それを適応する
戻り値で状態、エラーを表現する

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants