mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-15 12:16:31 +00:00
Fix challenges display issues
This commit is contained in:
parent
a6569e0961
commit
2c75e0c5b8
6 changed files with 15 additions and 16 deletions
|
|
@ -148,7 +148,7 @@ android {
|
|||
buildConfigField "String", "STORE", "\"google\""
|
||||
multiDexEnabled true
|
||||
|
||||
versionCode 2055
|
||||
versionCode 2057
|
||||
versionName "1.7"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,25 +66,26 @@
|
|||
android:textSize="12sp"
|
||||
tools:text="Description"
|
||||
android:layout_marginTop="@dimen/spacing_small"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"/>
|
||||
android:layout_marginBottom="@dimen/spacing_small"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/leaderParticipantLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/dialogue_participants" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/participantCount"
|
||||
style="@style/ChallengeTaskDetails"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:gravity="center_vertical"
|
||||
tools:text="12334" />
|
||||
<TextView
|
||||
android:id="@+id/official_challenge_view"
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@
|
|||
<dimen name="header_border_spacing">16dp</dimen>
|
||||
<dimen name="login_field_width">300dp</dimen>
|
||||
|
||||
<dimen name="bb_height">60dp</dimen>
|
||||
<dimen name="bb_height">65dp</dimen>
|
||||
<dimen name="bb_default_elevation">8dp</dimen>
|
||||
<dimen name="bb_fake_shadow_height">4dp</dimen>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -855,5 +855,6 @@
|
|||
<string name="gift_confirmation_title">Your gift was sent!</string>
|
||||
<string name="gift_confirmation_text_g1g1">Your gifted subscription was sent and your subscription applied to your account.</string>
|
||||
<string name="gift_confirmation_text">Your gifted subscription was sent and your subscription applied to your account.</string>
|
||||
<string name="discover">Discover</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -31,9 +31,6 @@ import io.reactivex.functions.Consumer
|
|||
import io.realm.RealmResults
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Named
|
||||
import android.widget.Toast
|
||||
import com.habitrpg.android.habitica.R.id.recyclerView
|
||||
|
||||
|
||||
|
||||
class ChallengeListFragment : BaseFragment(), androidx.swiperefreshlayout.widget.SwipeRefreshLayout.OnRefreshListener {
|
||||
|
|
@ -120,6 +117,8 @@ class ChallengeListFragment : BaseFragment(), androidx.swiperefreshlayout.widget
|
|||
}
|
||||
|
||||
override fun onRefresh() {
|
||||
nextPageToLoad = 0
|
||||
loadedAllData = false
|
||||
retrieveChallengesPage()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,12 +61,10 @@ class ChallengesOverviewFragment : BaseMainFragment() {
|
|||
statePagerAdapter = object : FragmentStatePagerAdapter(fragmentManager) {
|
||||
|
||||
override fun getItem(position: Int): androidx.fragment.app.Fragment? {
|
||||
val fragment = Fragment()
|
||||
|
||||
return when (position) {
|
||||
0 -> userChallengesFragment
|
||||
1 -> availableChallengesFragment
|
||||
else -> fragment
|
||||
return if (position == 0) {
|
||||
userChallengesFragment
|
||||
} else {
|
||||
availableChallengesFragment
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -77,7 +75,7 @@ class ChallengesOverviewFragment : BaseMainFragment() {
|
|||
override fun getPageTitle(position: Int): CharSequence? {
|
||||
return when (position) {
|
||||
0 -> getString(R.string.my_challenges)
|
||||
1 -> getString(R.string.public_challenges)
|
||||
1 -> getString(R.string.discover)
|
||||
else -> ""
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue