Skip to content

Commit 061e846

Browse files
Refactor: Optimize AdapterTask to use UserRepository
- Injected `UserRepository` into `AdapterTask` to handle user data fetching. - Removed direct `Realm` instance calls from `showAssignee` to prevent per-item database queries. - Updated `TeamTaskFragment` to use the inherited `userRepository` and pass it to the adapter. - Fixed a compilation error caused by a duplicate `UserRepository` injection. This change improves RecyclerView performance by centralizing data access and reducing synchronous I/O on the main thread.
1 parent a72d365 commit 061e846

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

app/src/main/java/org/ole/planet/myplanet/ui/team/teamTask/TeamTaskFragment.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ import org.ole.planet.myplanet.utilities.Utilities
4848

4949
@AndroidEntryPoint
5050
class TeamTaskFragment : BaseTeamFragment(), OnCompletedListener {
51-
@Inject
52-
lateinit var userRepository: UserRepository
5351
private var _binding: FragmentTeamTaskBinding? = null
5452
private val binding get() = _binding!!
5553
private var deadline: Calendar? = null

0 commit comments

Comments
 (0)