Skip to content

Conversation

@ptkNktq
Copy link
Owner

@ptkNktq ptkNktq commented Jan 19, 2026

Summary by CodeRabbit

リリースノート

  • 改善
    • 設定画面でWi-Fiのみ通知機能の設定を正しく読み込み・表示するようになりました
    • アプリケーション起動時にユーザー設定が確実に反映されるようになりました

✏️ Tip: You can customize this high-level summary in your review settings.

@ptkNktq ptkNktq self-assigned this Jan 19, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 19, 2026

ウォークスルー

新しいGetUserSettingsUseCaseインターフェースとその実装GetUserSettingsUseCaseImplを導入し、DIコンテナに配線しました。SettingsViewModelのコンストラクタに依存性を追加し、初期化時にユーザー設定を取得してUIステートに適用する処理を実装しました。

変更内容

コホート / ファイル 変更サマリー
DI設定と依存性注入
App.kt
GetUserSettingsUseCaseインターフェースと実装クラスのインポートを追加。Koinモジュールにfactory<GetUserSettingsUseCase>ファクトリを登録。
ユースケース層
domain/src/main/kotlin/me/nya_n/notificationnotifier/domain/usecase/GetUserSettingsUseCase.kt, domain/src/main/kotlin/me/nya_n/notificationnotifier/domain/usecase/impl/GetUserSettingsUseCaseImpl.kt
新しいユースケースインターフェースを追加。operator invoke()関数でUserSettingsを返す。実装クラスはUserSettingsRepositoryに委譲してユーザー設定を取得。
UI ViewModel
ui/src/main/kotlin/me/nya_n/notificationnotifier/ui/screen/settings/SettingsViewModel.kt
GetUserSettingsUseCase依存性をコンストラクタに追加(7→8パラメータ)。初期化処理でユースケースを呼び出し、wifi通知設定とアドレスをUIステートに設定。

推定コードレビュー工数

🎯 2 (Simple) | ⏱️ ~12分

関連する可能性のあるPR

  • Wi-Fi接続時のみ転送設定の追加 #305: SettingsViewModelのユーザー設定ユースケース依存性の追加およびWi-Fi設定の保存・使用ユースケース統合に関連した変更を実施しており、本PRと同様のUserSettings操作パターンを共有しています。

ポエム

🐰✨ 設定のユースケース、層を重ねて
リポジトリから飛ぶ、ウィジェットまで
DIの糸でつなぎて、きれいに整う
ユーザー設定よ、スムーズに流れろ 🎯

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Fix/settings' is vague and overly generic; it does not clearly describe what is being fixed or what specific changes were made to the settings functionality. Replace with a more descriptive title that specifies the actual change, such as 'Add GetUserSettingsUseCase to retrieve wifi-only notification settings' or similar to clarify the primary modification.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ptkNktq ptkNktq merged commit ef12633 into develop Jan 20, 2026
2 checks passed
@ptkNktq ptkNktq deleted the fix/settings branch January 20, 2026 15:32
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