Skip to content

Commit

Permalink
Merge branch 'master' into 5033-heading-submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
Okuro3499 committed Jan 15, 2025
2 parents 9accf71 + 6945416 commit d1f4779
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 16 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 26
targetSdkVersion 34
versionCode 2196
versionName "0.21.96"
versionCode 2199
versionName "0.21.99"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import kotlin.math.min
class Service(private val context: Context) {
private val preferences: SharedPreferences = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
private val retrofitInterface: ApiInterface? = ApiClient.client?.create(ApiInterface::class.java)

private val serviceScope = CoroutineScope(SupervisorJob() + Dispatchers.Main)

fun healthAccess(listener: SuccessListener) {
Expand Down Expand Up @@ -387,6 +386,8 @@ class Service(private val context: Context) {
val id = firstRow.getAsJsonPrimitive("id").asString
val doc = firstRow.getAsJsonObject("doc")
val code = doc.getAsJsonPrimitive("code").asString
val parentCode = doc.getAsJsonPrimitive("parentCode").asString
preferences.edit().putString("parentCode", parentCode).apply()
return@async UrlCheckResult.Success(id, code, currentUrl)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,6 @@ open class RealmUserModel : RealmObject() {
if (!TextUtils.isEmpty(JsonUtils.getString("planetCode", jsonDoc))) {
settings.edit().putString("planetCode", JsonUtils.getString("planetCode", jsonDoc)).apply()
}
if (!TextUtils.isEmpty(JsonUtils.getString("parentCode", jsonDoc))) {
settings.edit().putString("parentCode", JsonUtils.getString("parentCode", jsonDoc)).apply()
}

val csvRow = arrayOf(
user.userAdmin.toString(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import org.ole.planet.myplanet.MainApplication.Companion.context
import org.ole.planet.myplanet.R
import org.ole.planet.myplanet.ui.enterprises.EnterpriseCalendarFragment
import org.ole.planet.myplanet.ui.enterprises.FinanceFragment
import org.ole.planet.myplanet.ui.enterprises.ReportsFragment
import org.ole.planet.myplanet.ui.news.NewsFragment

class CommunityPagerAdapter(fm: FragmentActivity, private val id: String, private var fromLogin: Boolean) : FragmentStateAdapter(fm) {
private var titles = arrayOf(context.getString(R.string.our_voices), context.getString(R.string.community_leaders), context.getString(R.string.calendar), context.getString(
R.string.services), context.getString(R.string.finances))
R.string.services), context.getString(R.string.finances), context.getString(R.string.reports))
private var titlesLogin = arrayOf(context.getString(R.string.our_voices), context.getString(R.string.community_leaders), context.getString(R.string.calendar))
override fun createFragment(position: Int): Fragment {
val fragment: Fragment = when (position) {
Expand All @@ -22,14 +23,17 @@ class CommunityPagerAdapter(fm: FragmentActivity, private val id: String, privat
1 -> {
LeadersFragment()
}
2 -> {
EnterpriseCalendarFragment()
}
3 -> {
ServicesFragment()
}
2 -> {
EnterpriseCalendarFragment()
4 -> {
FinanceFragment()
}
else -> {
FinanceFragment()
ReportsFragment()
}
}
val b = Bundle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ abstract class BaseTeamFragment : BaseNewsFragment() {
mRealm.where(RealmMyTeam::class.java).equalTo("_id", teamId).findFirst()
?: throw IllegalArgumentException("Team not found for ID: $teamId")
} catch (e: IllegalArgumentException) {
e.printStackTrace()
try {
mRealm.where(RealmMyTeam::class.java).equalTo("teamId", teamId).findFirst()
?: throw IllegalArgumentException("Team not found for ID: $teamId")
} catch (e: IllegalArgumentException) {
e.printStackTrace()
return
}
}
Expand Down
9 changes: 5 additions & 4 deletions app/src/main/res/layout/fragment_my_course.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,12 @@
<ImageButton
android:id="@+id/filter"
style="@style/YellowButtons"
android:layout_width="@dimen/_50dp"
android:layout_height="@dimen/_50dp"
android:layout_margin="@dimen/padding_normal"
android:layout_gravity="center_vertical"
android:layout_width="@dimen/_40dp"
android:layout_height="@dimen/_40dp"
android:layout_margin="@dimen/padding_small"
android:background="@drawable/buttonyellow"
android:padding="@dimen/padding_normal"
android:padding="@dimen/padding_small"
android:text="@string/more_action"
android:textColor="@color/md_white_1000"
app:srcCompat="@drawable/ic_filter"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-night/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

<style name="AccentButton" parent="Theme.AppCompat">
<item name="android:textColor">@color/md_white_1000</item>
<item name="colorButtonNormal">@color/colorPrimaryDark</item>
<item name="colorButtonNormal">@color/mainColor</item>
<item name="colorControlHighlight">@color/colorPrimary</item>
</style>

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@

<style name="AccentButton" parent="Theme.AppCompat">
<item name="android:textColor">@color/md_white_1000</item>
<item name="colorButtonNormal">@color/colorPrimaryDark</item>
<item name="colorButtonNormal">@color/mainColor</item>
<item name="colorControlHighlight">@color/colorPrimary</item>
</style>

Expand Down

0 comments on commit d1f4779

Please sign in to comment.