Skip to content

Commit

Permalink
actions: less warnings is more (fixes #3699) (#3703)
Browse files Browse the repository at this point in the history
Co-authored-by: Gideon Okuro <[email protected]>
Co-authored-by: dogi <[email protected]>
  • Loading branch information
3 people committed Jul 3, 2024
1 parent 6a2d508 commit e653551
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 21
targetSdkVersion 34
versionCode 1647
versionName "0.16.47"
versionCode 1648
versionName "0.16.48"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.ole.planet.myplanet.ui.team

import android.content.DialogInterface
import android.os.Build
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
Expand All @@ -10,6 +11,7 @@ import android.widget.ArrayAdapter
import android.widget.LinearLayout
import android.widget.ListView
import android.widget.TextView
import androidx.annotation.RequiresApi
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.LinearLayoutManager
Expand Down Expand Up @@ -43,14 +45,15 @@ import org.ole.planet.myplanet.utilities.Utilities
import java.util.Date
import java.util.UUID

@RequiresApi(Build.VERSION_CODES.O)
class MyTeamsDetailFragment : BaseNewsFragment() {
private lateinit var fragmentMyTeamsDetailBinding: FragmentMyTeamsDetailBinding
lateinit var tvDescription: TextView
var user: RealmUserModel? = null
var teamId: String? = null
var team: RealmMyTeam? = null
lateinit var listContent: ListView
lateinit var tabLayout: TabLayout
private lateinit var tabLayout: TabLayout
lateinit var dbService: DatabaseService
private lateinit var rvDiscussion: RecyclerView
lateinit var llRv: LinearLayout
Expand Down Expand Up @@ -113,7 +116,7 @@ class MyTeamsDetailFragment : BaseNewsFragment() {
map["messageType"] = team?.teamType!!
map["messagePlanetCode"] = team?.teamPlanetCode!!
createNews(map, mRealm, user, imageList)
rvDiscussion.adapter?.notifyDataSetChanged()
rvDiscussion.adapter?.notifyItemInserted(0)
}.setNegativeButton(R.string.cancel, null).show()
}

Expand Down Expand Up @@ -233,14 +236,15 @@ class MyTeamsDetailFragment : BaseNewsFragment() {
llRv.visibility = View.GONE
tab.setText(s)
listContent.adapter = object : ArrayAdapter<RealmUserModel?>(requireActivity(), android.R.layout.simple_list_item_1, data) {
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
var convertView = convertView
override fun getView(position: Int, viewConverted: View?, parent: ViewGroup): View {
var convertView = viewConverted
if (convertView == null) {
convertView = LayoutInflater.from(activity)
.inflate(android.R.layout.simple_list_item_1, parent, false)
}
val tv = convertView!!.findViewById<TextView>(android.R.id.text1)
tv.text = getItem(position)?.name + " (" + getVisitCount(mRealm, getItem(position)?.name, teamId) + getString(R.string.visits) + ")"
val formattedText = getString(R.string.visit_count, getItem(position)?.name ?: "", getVisitCount(mRealm, getItem(position)?.name, teamId), getString(R.string.visits))
tv.text = formattedText
return convertView
}
}
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@
<string name="checking_server">جارٍ فحص الخادم</string>
<string name="below_min_apk">إصدار Apk أقل من المسموح. يرجى تحديث التطبيق إلى أحدث إصدار.</string>
<string name="add_note">إضافة ملاحظة (اختياري)</string>
<string name="visit_count">%s (%d %s)</string>
<string name="no_teams">الفرق غير متوفرة</string>
<string name="planet_name">كوكب %s</string>
<string name="no_submissions">التقديمات غير متاحة</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@
<string name="checking_server">verificando el servidor</string>
<string name="below_min_apk">la versión de la aplicación está por debajo de la permitida. Actualice la aplicación a la última versión.</string>
<string name="add_note">Agregar una nota (opcional)</string>
<string name="visit_count">%s (%d %s)</string>
<string name="no_teams">equipos no disponibles</string>
<string name="planet_name">%s Planeta</string>
<string name="no_submissions">envíos no disponibles</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@
<string name="checking_server">vérification du serveur</string>
<string name="below_min_apk">la version de l\'app est inférieure à celle autorisée. veuillez mettre à jour l\'application vers la dernière version.</string>
<string name="add_note">Ajouter une note (optionnel)</string>
<string name="visit_count">%s (%d %s)</string>
<string name="no_teams">équipes non disponibles</string>
<string name="planet_name">%s planète</string>
<string name="no_submissions">soumissions non disponibles</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-ne/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@
<string name="checking_server">सर्भर जाँच गर्दै</string>
<string name="below_min_apk">एप संस्करण अनुमत संस्करणभन्दा कम छ। कृपया अनुप्रयोगलाई नवीनतम संस्करणमा अद्यावधिक गर्नुहोस्।</string>
<string name="add_note">नोट थप्नुहोस् (वैकल्पिक)</string>
<string name="visit_count">%s (%d %s)</string>
<string name="no_teams">टोलीहरू उपलब्ध छैनन्</string>
<string name="planet_name">%s ग्रह</string>
<string name="no_submissions">पेशाहरू उपलब्ध छैनन्</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-so/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@
<string name="checking_server">hubinta server-ka</string>
<string name="below_min_apk">nooca app-ga waa ka hooseeyaa kan la oggol yahay. fadlan cusbooneysii app-ka nooca ugu dambeeya.</string>
<string name="add_note">Ku dar falanqeey (ixtiyaacsi ah)</string>
<string name="visit_count">%s (%d %s)</string>
<string name="no_teams">kooxaha aan la heli karin</string>
<string name="planet_name">%s Meerah</string>
<string name="no_submissions">soo gudbin lama heli karo</string>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@
<string name="checking_server">checking server</string>
<string name="below_min_apk">app is below allowed version. please update the app to the latest version.</string>
<string name="add_note">add a note (optional)</string>
<string name="visit_count">%s (%d %s)</string
<string name="no_teams">teams not available</string>
<string name="planet_name">%s\'s Planet</string>
<string name="no_submissions">submissions not available</string>
Expand Down

0 comments on commit e653551

Please sign in to comment.