You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/src/main/java/com/example/util/simpletimetracker/core/interactor/RecordCommentSearchViewDataInteractor.kt
+2-6Lines changed: 2 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -126,12 +126,8 @@ class RecordCommentSearchViewDataInteractor @Inject constructor(
126
126
privatesuspendfungetFavouriteData(
127
127
typeId:Long,
128
128
): List<ViewHolderType> {
129
-
val (included, excluded) = recordTypeToFavouriteCommentInteractor.getAll()
130
-
.partition { it.recordTypeId == typeId }
131
-
val includedComments = included.map { it.commentId }
132
-
val excludedComments = excluded.map { it.commentId }
Copy file name to clipboardExpand all lines: domain/src/main/java/com/example/util/simpletimetracker/domain/favourite/interactor/FavouriteCommentInteractor.kt
Copy file name to clipboardExpand all lines: domain/src/main/java/com/example/util/simpletimetracker/domain/favourite/interactor/RecordTypeToFavouriteCommentInteractor.kt
Copy file name to clipboardExpand all lines: features/feature_change_record/src/main/java/com/example/util/simpletimetracker/feature_change_record/interactor/ChangeRecordViewDataInteractor.kt
+3-10Lines changed: 3 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -66,16 +66,9 @@ class ChangeRecordViewDataInteractor @Inject constructor(
66
66
val isDarkTheme = prefsInteractor.getDarkMode()
67
67
68
68
val favouriteComment = favouriteCommentInteractor.get(comment)
69
-
val isFavourite =if (favouriteComment ==null) falseelse {
70
-
val (included, excluded) = recordTypeToFavouriteCommentInteractor.getAll()
71
-
.partition { it.recordTypeId == typeId }
72
-
val includedComments = included.map { it.commentId }
73
-
val excludedComments = excluded.map { it.commentId }
74
-
(
75
-
includedComments.contains(favouriteComment.id) ||
76
-
!excludedComments.contains(favouriteComment.id)
77
-
)
78
-
}
69
+
val isFavourite =if (favouriteComment ==null) falseelse
0 commit comments