Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactors #285

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

Merged
hoc081098 merged 7 commits into master from tweaks
Jul 13, 2025
Merged

Refactors #285

hoc081098 merged 7 commits into master from tweaks
Jul 13, 2025

Conversation

@hoc081098
Copy link
Member

@hoc081098 hoc081098 commented Jul 13, 2025

This pull request introduces several changes across the codebase, focusing on code style updates, dependency upgrades, and renaming methods and use cases to improve clarity and functionality. The most significant updates include renaming the getUsers method and related use cases to observeUsers, updating the Kotlin compiler version, and adding a new import layout configuration.

Key Changes:

Code Style and Configuration Updates:

  • Added a new import layout configuration in .idea/codeStyles/Project.xml to standardize import ordering across the project.
  • Updated Kotlin compiler version from 2.1.20 to 2.2.0 in .idea/kotlinc.xml.

Method and Use Case Renaming:

  • Renamed getUsers to observeUsers in UserRepository, UserRepositoryImpl, and all associated use cases, tests, and references to better reflect its functionality as a flow-based observable. [1] [2] [3] [4] [5]

Dependency and Code Updates:

  • Replaced ContinuationInterceptor with CoroutineDispatcher in debugCheckImmediateMainDispatcher for improved clarity and functionality.
  • Removed unused Timber logging in CollectIn.kt to clean up the code. [1] [2]

Miscellaneous:

  • Updated the LICENSE file to extend copyright to 2025.
  • Changed the base class of UserError from Throwable to RuntimeException for better semantic alignment.

These changes collectively improve code clarity, maintainability, and adherence to modern Kotlin practices.

@hoc081098 hoc081098 added the enhancement New feature or request label Jul 13, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request implements a comprehensive refactoring that renames the getUsers method and related use cases to observeUsers to better reflect the flow-based observable nature of the functionality. The changes also include code style improvements, dependency updates, and minor optimizations.

Key changes:

  • Renamed getUsers to observeUsers across the entire codebase including repositories, use cases, tests, and ViewModels
  • Updated various code style elements including constant naming conventions and coroutine dispatcher handling
  • Added performance optimizations and removed unused logging statements

Reviewed Changes

Copilot reviewed 15 out of 20 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
AbstractMviViewModel.kt Updated constant naming convention and added coroutine annotations
MainVMTest.kt Updated test to use renamed ObserveUsersUseCase
MainVM.kt Updated ViewModel to use renamed use case and method
UseCaseTest.kt Updated all test cases to use renamed ObserveUsersUseCase
ObserveUsersUseCase.kt Renamed class and method from GetUsersUseCase.getUsers()
UserRepository.kt Renamed interface method from getUsers() to observeUsers()
UserError.kt Changed base class from Throwable to RuntimeException
DomainModule.kt Updated dependency injection to use renamed use case
UserRepositoryImplTest.kt Updated test method names and calls to use observeUsers()
UserRepositoryImplRealAPITest.kt Updated integration test to use observeUsers()
UserRepositoryImpl.kt Implemented renamed method in repository implementation
selfReference.kt Added inline optimization and suppression annotations
debugCheckImmediateMainDispatcher.kt Replaced ContinuationInterceptor with CoroutineDispatcher
CollectIn.kt Removed unused Timber logging statement
LICENSE Updated copyright year to 2025
Files not reviewed (4)
  • .idea/codeStyles/Project.xml: Language not supported
  • .idea/compiler.xml: Language not supported
  • .idea/kotlinc.xml: Language not supported
  • .idea/misc.xml: Language not supported

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@hoc081098 hoc081098 changed the title (削除) Tweaks (削除ここまで) (追記) Refactors (追記ここまで) Jul 13, 2025
Copy link

codecov bot commented Jul 13, 2025
edited
Loading

Codecov Report

Attention: Patch coverage is 50.00000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 61.19%. Comparing base (944d925) to head (f9443f3).
Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
...owmvi/core_ui/debugCheckImmediateMainDispatcher.kt 28.57% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@ Coverage Diff @@
## master #285 +/- ##
==========================================
- Coverage 61.30% 61.19% -0.12% 
==========================================
 Files 37 37 
 Lines 1106 1108 +2 
 Branches 104 106 +2 
==========================================
 Hits 678 678 
 Misses 414 414 
- Partials 14 16 +2 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hoc081098 hoc081098 merged commit f70107e into master Jul 13, 2025
6 of 8 checks passed
@hoc081098 hoc081098 deleted the tweaks branch July 13, 2025 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot Copilot left review comments

Assignees

No one assigned

Labels

enhancement New feature or request

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /