-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔀 resolve conflicts from android dev branch
- Loading branch information
Showing
23 changed files
with
261 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 12 additions & 1 deletion
13
android/app/src/main/java/net/pengcook/android/presentation/detail/DetailRecipeViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
package net.pengcook.android.presentation.detail | ||
|
||
// DetailRecipeViewModel.kt | ||
import androidx.lifecycle.LiveData | ||
import androidx.lifecycle.MutableLiveData | ||
import androidx.lifecycle.ViewModel | ||
import net.pengcook.android.presentation.core.model.Recipe | ||
import net.pengcook.android.presentation.core.util.Event | ||
|
||
class DetailRecipeViewModel( | ||
private val recipe: Recipe, | ||
) : ViewModel() | ||
) : ViewModel() { | ||
private val _navigateToStepEvent = MutableLiveData<Event<Boolean>>() | ||
val navigateToStepEvent: LiveData<Event<Boolean>> get() = _navigateToStepEvent | ||
|
||
fun onNavigateToMakingStep() { | ||
_navigateToStepEvent.value = Event(true) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
android/app/src/main/java/net/pengcook/android/presentation/home/holder/FeedViewHolder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package net.pengcook.android.presentation.home.holder | ||
|
||
import androidx.recyclerview.widget.RecyclerView | ||
import net.pengcook.android.databinding.ItemFeedBinding | ||
import net.pengcook.android.presentation.core.model.Recipe | ||
import net.pengcook.android.presentation.home.listener.FeedItemEventListener | ||
|
||
class FeedViewHolder( | ||
private val binding: ItemFeedBinding, | ||
private val eventListener: FeedItemEventListener, | ||
) : RecyclerView.ViewHolder(binding.root) { | ||
fun bind(item: Recipe) { | ||
binding.recipe = item | ||
binding.eventListener = eventListener | ||
binding.executePendingBindings() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.