Skip to content

Commit

Permalink
Gradle update, offerButton.isEnabled = false in initial (#8600)
Browse files Browse the repository at this point in the history
  • Loading branch information
lishaoxia1985 authored Feb 6, 2023
1 parent 8f56a88 commit 4b2d4a3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class CustomFileLocationHelperAndroid(private val activity: Activity) : CustomFi
cursor.use {
// we should have a direct URI to a file, so first is enough
if (it?.moveToFirst() == true) {
it.getString(it.getColumnIndex(OpenableColumns.DISPLAY_NAME))
it.getString(it.getColumnIndexOrThrow(OpenableColumns.DISPLAY_NAME))
} else ""
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ buildscript {
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${com.unciv.build.BuildConfig.kotlinVersion}")
classpath("de.richsource.gradle.plugins:gwt-gradle-plugin:0.6")
classpath("com.android.tools.build:gradle:7.1.3")
classpath("com.android.tools.build:gradle:7.4.1")
classpath("com.mobidevelop.robovm:robovm-gradle-plugin:2.3.1")
}
}
Expand Down
4 changes: 2 additions & 2 deletions core/src/com/unciv/ui/trade/TradeTable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import com.unciv.ui.utils.extensions.isEnabled
import com.unciv.ui.utils.extensions.onClick
import com.unciv.ui.utils.extensions.toTextButton

class TradeTable(val otherCivilization: Civilization, stage: DiplomacyScreen): Table(BaseScreen.skin) {
class TradeTable(private val otherCivilization: Civilization, stage: DiplomacyScreen): Table(BaseScreen.skin) {
val currentPlayerCiv = otherCivilization.gameInfo.getCurrentPlayerCivilization()
var tradeLogic = TradeLogic(currentPlayerCiv,otherCivilization)
var offerColumnsTable = OfferColumnsTable(tradeLogic, stage) { onChange() }
// This is so that after a trade has been traded, we can switch out the offersToDisplay to start anew - this is the easiest way
private var offerColumnsTableWrapper = Table()
val offerButton = "Offer trade".toTextButton()
private val offerButton = "Offer trade".toTextButton().apply{ isEnabled = false }

private fun isTradeOffered() = otherCivilization.tradeRequests.any { it.requestingCiv == currentPlayerCiv.civName }

Expand Down
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Mon Feb 06 15:51:42 CST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

0 comments on commit 4b2d4a3

Please sign in to comment.