Skip to content

BasicAlertDialog実装 (テストなし) - #26

Open
v-tnta wants to merge 12 commits into
v-tnta/mainfrom
v-tnta/task4
Open

BasicAlertDialog実装 (テストなし)#26
v-tnta wants to merge 12 commits into
v-tnta/mainfrom
v-tnta/task4

Conversation

@v-tnta

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

Copy link
Copy Markdown

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

@mkeeda mkeeda left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
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.

2 participants