Skip to content

Commit 85a8050

Browse files
authored
Merge pull request #4337 from CruGlobal/toolDetailsTipsTutorial
2 parents b3fc61a + b65cdda commit 85a8050

16 files changed

Lines changed: 205 additions & 300 deletions

File tree

app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,6 @@
9797
</intent-filter>
9898
</activity>
9999

100-
<activity
101-
android:name=".ui.tooldetails.ToolDetailsActivity"
102-
android:parentActivityName=".ui.dashboard.DashboardActivity"
103-
android:screenOrientation="@integer/default_screen_orientation" />
104-
105100
<activity
106101
android:name=".base.ui.circuit.CircuitActivity"
107102
android:exported="true">

app/src/main/kotlin/org/cru/godtools/ui/dashboard/DashboardActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import org.cru.godtools.base.ui.theme.GodToolsTheme
2929
import org.cru.godtools.model.Tool
3030
import org.cru.godtools.ui.dashboard.optinnotification.OptInNotificationController
3131
import org.cru.godtools.ui.onboarding.OnboardingScreen
32-
import org.cru.godtools.ui.tooldetails.startToolDetailsActivity
32+
import org.cru.godtools.ui.tooldetails.ToolDetailsScreen
3333
import org.cru.godtools.util.openToolActivity
3434

3535
@AndroidEntryPoint
@@ -82,7 +82,7 @@ class DashboardActivity : BaseActivity() {
8282
is DashboardEvent.OpenTool ->
8383
openTool(e.tool, e.type, *listOfNotNull(e.lang1, e.lang2).toTypedArray())
8484
is DashboardEvent.OpenToolDetails ->
85-
e.tool?.let { startToolDetailsActivity(it, e.lang) }
85+
e.tool?.let { startCircuitActivity(ToolDetailsScreen(it, e.lang)) }
8686
}
8787
},
8888
)

app/src/main/kotlin/org/cru/godtools/ui/dashboard/home/AllFavoritesPresenter.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ class AllFavoritesPresenter @AssistedInject constructor(
5858
when (it) {
5959
ToolCard.Event.Click,
6060
ToolCard.Event.OpenTool -> {
61-
val intent = tool.createToolIntent(
62-
context = context,
61+
val intent = context.createToolIntent(
62+
tool = tool,
6363
languages = listOfNotNull(
6464
tool.primaryLocale ?: state.translation?.languageCode,
6565
tool.parallelLocale

app/src/main/kotlin/org/cru/godtools/ui/dashboard/home/HomePresenter.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ class HomePresenter @AssistedInject constructor(
9393
lessonState = toolCardPresenter.present(lesson) {
9494
when (it) {
9595
ToolCard.Event.Click -> {
96-
val intent = lesson.createToolIntent(
97-
context = context,
96+
val intent = context.createToolIntent(
97+
tool = lesson,
9898
languages = listOfNotNull(lessonState.translation?.languageCode),
9999
resumeProgress = true,
100100
)
@@ -133,8 +133,8 @@ class HomePresenter @AssistedInject constructor(
133133
when (it) {
134134
ToolCard.Event.Click,
135135
ToolCard.Event.OpenTool -> {
136-
val intent = tool.createToolIntent(
137-
context = context,
136+
val intent = context.createToolIntent(
137+
tool = tool,
138138
languages = listOfNotNull(
139139
tool.primaryLocale ?: state.translation?.languageCode,
140140
tool.parallelLocale

app/src/main/kotlin/org/cru/godtools/ui/dashboard/lessons/LessonsPresenter.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ class LessonsPresenter @AssistedInject constructor(
157157
eventBus.post(OpenAnalyticsActionEvent(ACTION_OPEN_LESSON, tool.code, SOURCE_LESSONS))
158158
navigator.goTo(
159159
IntentScreen(
160-
tool.createToolIntent(
161-
context = context,
160+
context.createToolIntent(
161+
tool = tool,
162162
languages = listOfNotNull(toolState.translation?.languageCode),
163163
resumeProgress = true
164164
) ?: return@present

app/src/main/kotlin/org/cru/godtools/ui/tooldetails/OpenToolTrainingScreen.kt

Lines changed: 0 additions & 17 deletions
This file was deleted.

app/src/main/kotlin/org/cru/godtools/ui/tooldetails/SelectedToolSavedState.kt

Lines changed: 0 additions & 26 deletions
This file was deleted.

app/src/main/kotlin/org/cru/godtools/ui/tooldetails/ToolDetailsActivity.kt

Lines changed: 0 additions & 126 deletions
This file was deleted.

0 commit comments

Comments
 (0)