This commit is contained in:
Phillip Thelen 2022-05-17 12:23:25 +02:00
parent 45103f55e0
commit dd3f4e0da1
8 changed files with 14 additions and 36 deletions

View file

@ -128,10 +128,6 @@
android:label="@string/community_guidelines">
</activity>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
<meta-data
android:name="com.facebook.sdk.AutoLogAppEventsEnabled"
android:value="false"/>
<activity
android:name=".ui.activities.TaskFormActivity"
android:parentActivityName=".ui.activities.MainActivity"
@ -189,9 +185,6 @@
android:name="android.support.PARENT_ACTIVITY"
android:value=".ui.activities.MainActivity" />
</activity>
<activity android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name" />
<activity android:name=".ui.activities.MaintenanceActivity"
android:screenOrientation="unspecified"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />

View file

@ -103,12 +103,6 @@
tools:ignore="UnusedAttribute"
android:label="@string/invite_users">
</activity>
<activity android:name="com.facebook.FacebookActivity"
android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:label="@string/app_name" />
<activity android:name=".ui.activities.MaintenanceActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />

View file

@ -167,7 +167,7 @@ android {
buildConfigField "String", "TESTING_LEVEL", "\"production\""
resConfigs 'en', 'bg', 'de', 'en-rGB', 'es', 'fr', 'hr-rHR', 'in', 'it', 'iw', 'ja', 'ko', 'lt', 'nl', 'pl', 'pt-rBR', 'pt-rPT', 'ru', 'tr', 'zh', 'zh-rTW'
versionCode 3504
versionCode 3506
versionName "3.6"
targetSdkVersion 32

View file

@ -2,7 +2,9 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="60dp">
android:layout_height="60dp"
android:background="@drawable/button_background_primary"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -10,7 +12,7 @@
android:letterSpacing="0.02"
android:fontFamily="@string/font_family_medium"
android:text="@string/hatch"
android:textColor="?attr/colorAccent"
android:textColor="@color/white"
android:layout_marginEnd="6dp"
/>
<com.habitrpg.android.habitica.ui.views.CurrencyView

View file

@ -104,10 +104,6 @@
<key>enableTeamBoards</key>
<value>false</value>
</entry>
<entry>
<key>hideFacebook</key>
<value>false</value>
</entry>
<entry>
<key>enableNewArmoire</key>
@ -115,7 +111,7 @@
</entry>
<entry>
<key>enableArmoireAds</key>
<value>true</value>
<value>false</value>
</entry>
<entry>
<key>enableFaintAds</key>

View file

@ -157,8 +157,4 @@ class AppConfigManager(contentRepository: ContentRepository?) {
fun enableNewArmoire(): Boolean {
return remoteConfig.getBoolean("enableNewArmoire")
}
fun hideFacebook(): Boolean {
return remoteConfig.getBoolean("hideFacebook")
}
}

View file

@ -139,7 +139,7 @@ class ChallengeListFragment : BaseFragment<FragmentRefreshRecyclerviewBinding>()
compositeSubscription.add(
observable.subscribe(
{ challenges ->
if (challenges.size == 0) {
if (challenges.isEmpty()) {
retrieveChallengesPage()
}
this.challenges = challenges

View file

@ -4,10 +4,10 @@ import android.content.Context
import android.graphics.drawable.BitmapDrawable
import android.view.LayoutInflater
import android.view.View
import android.widget.LinearLayout
import androidx.core.graphics.drawable.toBitmap
import com.habitrpg.android.habitica.HabiticaBaseApplication
import com.habitrpg.android.habitica.R
import com.habitrpg.android.habitica.databinding.DialogHatchPetButtonBinding
import com.habitrpg.android.habitica.databinding.DialogPetSuggestHatchBinding
import com.habitrpg.android.habitica.extensions.subscribeWithErrorHandler
import com.habitrpg.android.habitica.helpers.RxErrorHandler
@ -20,7 +20,6 @@ import com.habitrpg.android.habitica.ui.activities.BaseActivity
import com.habitrpg.android.habitica.ui.activities.MainActivity
import com.habitrpg.android.habitica.ui.helpers.DataBindingUtils
import com.habitrpg.android.habitica.ui.helpers.loadImage
import com.habitrpg.android.habitica.ui.views.CurrencyView
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
import io.reactivex.rxjava3.core.Flowable
import io.reactivex.rxjava3.core.Observable
@ -130,15 +129,11 @@ class PetSuggestHatchDialog(context: Context) : HabiticaAlertDialog(context) {
hatchPrice += getItemPrice(pet, potion, hasUnlockedPotion)
}
addButton(R.string.close, true)
if (hatchPrice > 0) {
val linearLayout = layoutInflater.inflate(R.layout.dialog_hatch_pet_button, null) as? LinearLayout ?: return
val priceView = linearLayout.findViewById<CurrencyView>(R.id.currencyView)
priceView?.value = hatchPrice.toDouble()
priceView?.currency = "gems"
addButton(linearLayout, true) { _, _ ->
val binding = DialogHatchPetButtonBinding.inflate(layoutInflater)
binding.currencyView.value = hatchPrice.toDouble()
binding.currencyView.currency = "gems"
addButton(binding.root, true) { _, _ ->
val activity = (getActivity() as? MainActivity) ?: return@addButton
val thisPotion = potion ?: return@addButton
val thisEgg = egg ?: return@addButton
@ -160,6 +155,8 @@ class PetSuggestHatchDialog(context: Context) : HabiticaAlertDialog(context) {
}
}
addButton(R.string.close, false)
setTitle(R.string.unhatched_pet)
}