Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lazaronixon committed Sep 30, 2023
1 parent f9cf516 commit 64ced20
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ class NavButtonComponent(
private fun showToolbarButton(data: MessageData) {
val toolbar = toolbar ?: return

toolbar.menu.findItem(R.id.navButton)?.apply {
toolbar.menu.findItem(R.id.nav_button)?.apply {
isVisible = true
title = data.title
}

toolbar.setOnMenuItemClickListener {
when (it.itemId) {
R.id.navButton -> {
R.id.nav_button -> {
performClick()
true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/navButton"
android:id="@+id/nav_button"
android:orderInCategory="999"
android:visible="false"
app:iconTint="?colorControlNormal"
app:showAsAction="always"
tools:ignore="AlwaysShowAction" />
app:showAsAction="always" />
</menu>
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ class NavButtonComponent(
private fun showToolbarButton(data: MessageData) {
val toolbar = toolbar ?: return

toolbar.menu.findItem(R.id.navButton)?.apply {
toolbar.menu.findItem(R.id.nav_button)?.apply {
isVisible = true
title = data.title
}

toolbar.setOnMenuItemClickListener {
when (it.itemId) {
R.id.navButton -> {
R.id.nav_button -> {
performClick()
true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/navButton"
android:id="@+id/nav_button"
android:orderInCategory="999"
android:visible="false"
app:iconTint="?colorControlNormal"
app:showAsAction="always"
tools:ignore="AlwaysShowAction" />
app:showAsAction="always" />
</menu>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
5D8AB2FC2ABC117F00C6A82F /* BridgeComponent+App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D8AB2FA2ABC117F00C6A82F /* BridgeComponent+App.swift */; };
5D8AB2FE2ABC119900C6A82F /* WKWebViewConfiguration+App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D8AB2FD2ABC119900C6A82F /* WKWebViewConfiguration+App.swift */; };
5D8AB3012ABC127300C6A82F /* Strada in Frameworks */ = {isa = PBXBuildFile; productRef = 5D8AB3002ABC127300C6A82F /* Strada */; };
5DA9C9312AC7E7C400FEA7E6 /* MenuComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DA9C9302AC7E7C400FEA7E6 /* MenuComponent.swift */; };
5DA9C9352AC874D200FEA7E6 /* MenuComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DA9C9342AC874D200FEA7E6 /* MenuComponent.swift */; };
5DCC50D42A959DF900B529A0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DCC50D32A959DF900B529A0 /* AppDelegate.swift */; };
5DCC50D62A959DF900B529A0 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DCC50D52A959DF900B529A0 /* SceneDelegate.swift */; };
5DCC50D82A959DF900B529A0 /* TurboWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DCC50D72A959DF900B529A0 /* TurboWebViewController.swift */; };
Expand All @@ -37,8 +37,8 @@
5D8AB2F92ABC117F00C6A82F /* FormComponent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FormComponent.swift; sourceTree = "<group>"; };
5D8AB2FA2ABC117F00C6A82F /* BridgeComponent+App.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "BridgeComponent+App.swift"; sourceTree = "<group>"; };
5D8AB2FD2ABC119900C6A82F /* WKWebViewConfiguration+App.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "WKWebViewConfiguration+App.swift"; sourceTree = "<group>"; };
5DA9C9342AC874D200FEA7E6 /* MenuComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuComponent.swift; sourceTree = "<group>"; };
5DCC50D02A959DF900B529A0 /* <%= name %>.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = <%= name %>.app; sourceTree = BUILT_PRODUCTS_DIR; };
5DA9C9302AC7E7C400FEA7E6 /* MenuComponent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MenuComponent.swift; path = "../../../turbo-native-initializer/lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Strada/MenuComponent.swift"; sourceTree = "<group>"; };
5DCC50D32A959DF900B529A0 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
5DCC50D52A959DF900B529A0 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
5DCC50D72A959DF900B529A0 /* TurboWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TurboWebViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -81,7 +81,7 @@
5D8AB2F92ABC117F00C6A82F /* FormComponent.swift */,
5D1F2EC02ABEB12300B2819A /* NavButtonComponent.swift */,
5D2381402AC53D8900FABA1F /* FlashMessageComponent.swift */,
5DA9C9302AC7E7C400FEA7E6 /* MenuComponent.swift */,
5DA9C9342AC874D200FEA7E6 /* MenuComponent.swift */,
);
path = Strada;
sourceTree = "<group>";
Expand Down Expand Up @@ -227,7 +227,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5DA9C9312AC7E7C400FEA7E6 /* MenuComponent.swift in Sources */,
5DA9C9352AC874D200FEA7E6 /* MenuComponent.swift in Sources */,
5DCC50D82A959DF900B529A0 /* TurboWebViewController.swift in Sources */,
5DDD58812AA9A8BE00FAC961 /* NumbersViewController.swift in Sources */,
5D2381412AC53D8900FABA1F /* FlashMessageComponent.swift in Sources */,
Expand Down

0 comments on commit 64ced20

Please sign in to comment.