From ee63619debbe0944d2081e4fcd235ff83ca11725 Mon Sep 17 00:00:00 2001 From: dogi <dogi@users.noreply.github.com> Date: Wed, 3 Jul 2024 16:11:45 -0400 Subject: [PATCH 1/4] actions: better release outputs (fixes #3761) (#3768) --- .github/workflows/android-build.yml | 10 ++++----- .github/workflows/android-release.yml | 31 +++++++++++++++------------ app/build.gradle | 4 ++-- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index 4ca389421e..7920396235 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -15,7 +15,7 @@ jobs: matrix: build: [default, lite] env: - FILES: | + LITES: | app/src/main/AndroidManifest.xml app/src/main/java/org/ole/planet/myplanet/base/PermissionActivity.kt app/src/main/java/org/ole/planet/myplanet/base/BaseContainerFragment.kt @@ -30,7 +30,7 @@ jobs: - name: check for .lite diffs if: matrix.build == 'lite' run: | - echo "${{ env.FILES }}" | xargs -n 1 | while read file; do + echo "${{ env.LITES }}" | xargs -n 1 | while read file; do ls -al $file* diff "$file" "$file.lite" || true done @@ -52,12 +52,12 @@ jobs: - name: diff the code to get lite if: matrix.build == 'lite' run: | - echo "${{ env.FILES }}" | xargs -n 1 | while read file; do + ls -al app/build.gradle + sed -i 's/\(versionName "[0-9.]\+\)"/\1-lite"/' app/build.gradle + echo "${{ env.LITES }}" | xargs -n 1 | while read file; do ls -al $file* cp "${file}.lite" "$file" done - ls -al app/build.gradle - sed -i 's/\(versionName "[0-9.]\+\)"/\1-lite"/' app/build.gradle - name: build debug as test run: ./gradlew assembleDebug --configuration-cache --no-daemon diff --git a/.github/workflows/android-release.yml b/.github/workflows/android-release.yml index a63f98508b..4e5b487e8c 100644 --- a/.github/workflows/android-release.yml +++ b/.github/workflows/android-release.yml @@ -15,11 +15,16 @@ jobs: matrix: build: [default, lite] env: - FILES: | + LITES: | app/src/main/AndroidManifest.xml app/src/main/java/org/ole/planet/myplanet/base/PermissionActivity.kt app/src/main/java/org/ole/planet/myplanet/base/BaseContainerFragment.kt app/src/main/java/org/ole/planet/myplanet/ui/dashboard/DashboardActivity.kt + OUTPUTS: | + .apk + .apk.sha256 + .aab + .aab.sha256 steps: - name: checkout repository code @@ -44,13 +49,13 @@ jobs: - name: diff the code to get lite if: matrix.build == 'lite' run: | - echo "${{ env.FILES }}" | xargs -n 1 | while read file; do + echo ANDROID_VERSION_LITE=$(grep -oP 'versionName "\K[^\"]+' app/build.gradle) >> $GITHUB_ENV + ls -al app/build.gradle + sed -i 's/\(versionName "[0-9.]\+\)"/\1-lite"/' app/build.gradle + echo "${{ env.LITES }}" | xargs -n 1 | while read file; do ls -al $file* cp "${file}.lite" "$file" done - ls -al app/build.gradle - echo ANDROID_VERSION_LITE=$(grep -oP 'versionName "\K[^\"]+' app/build.gradle) >> $GITHUB_ENV - sed -i 's/\(versionName "[0-9.]\+\)"/\1-lite"/' app/build.gradle - name: build release APK and AAB run: | @@ -108,12 +113,11 @@ jobs: - name: rename APK and AAB with version and branch for artifact if: github.event_name == 'workflow_dispatch' run: | - echo "BRANCHNAME=${GITHUB_REF##*/}" >> $GITHUB_ENV - mv output/myPlanet.apk output/myPlanet-${{ env.ANDROID_VERSION_NAME }}-${{ env.BRANCHNAME }}.apk - mv output/myPlanet.apk.sha256 output/myPlanet-${{ env.ANDROID_VERSION_NAME }}-${{ env.BRANCHNAME }}.apk.sha256 - mv output/myPlanet.aab output/myPlanet-${{ env.ANDROID_VERSION_NAME }}-${{ env.BRANCHNAME }}.aab - mv output/myPlanet.aab.sha256 output/myPlanet-${{ env.ANDROID_VERSION_NAME }}-${{ env.BRANCHNAME }}.aab.sha256 + echo "${{ env.OUTPUTS }}" | xargs -n 1 | while read type; do + mv "output/myPlanet${type}" "output/myPlanet-${{ env.ANDROID_VERSION_NAME }}-${GITHUB_REF##*/}${type}" + done ls -alR output + echo "BRANCHNAME=${GITHUB_REF##*/}" >> $GITHUB_ENV - name: upload APK and AAB as build artifact if: github.event_name == 'workflow_dispatch' @@ -126,10 +130,9 @@ jobs: - name: pre-process files and tag for lite version if: github.event_name != 'workflow_dispatch' && matrix.build == 'lite' run: | - mv output/myPlanet.apk output/myPlanet-lite.apk - mv output/myPlanet.apk.sha256 output/myPlanet-lite.apk.sha256 - mv output/myPlanet.aab output/myPlanet-lite.aab - mv output/myPlanet.aab.sha256 output/myPlanet-lite.aab.sha256 + echo "${{ env.OUTPUTS }}" | xargs -n 1 | while read type; do + mv "output/myPlanet${type}" "output/myPlanet-lite${type}" + done echo "ANDROID_VERSION_NAME=${ANDROID_VERSION_LITE}" >> $GITHUB_ENV - name: release APK and AAB on GitHub diff --git a/app/build.gradle b/app/build.gradle index 62d8b3212d..1b6dd62cec 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "org.ole.planet.myplanet" minSdkVersion 21 targetSdkVersion 34 - versionCode 1651 - versionName "0.16.51" + versionCode 1652 + versionName "0.16.52" ndkVersion '21.3.6528147' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true From f4425543184e573e6c64e04dc9ca30f3f9a5e0ce Mon Sep 17 00:00:00 2001 From: dogi <dogi@users.noreply.github.com> Date: Wed, 3 Jul 2024 16:18:43 -0400 Subject: [PATCH 2/4] actions: better `lite` build test (fixes #3695) (#3769) --- .github/workflows/android-build.yml | 2 +- app/build.gradle | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index 7920396235..7f286979e5 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -32,7 +32,7 @@ jobs: run: | echo "${{ env.LITES }}" | xargs -n 1 | while read file; do ls -al $file* - diff "$file" "$file.lite" || true + diff <(sed 's/^\s*\/\///; s/^\s*<!--//; s/-->\s*$//' "$file") <(sed 's/^\s*\/\///; s/^\s*<!--//; s/-->\s*$//' "$file.lite") done - name: setup JDK 17 diff --git a/app/build.gradle b/app/build.gradle index 1b6dd62cec..881dcc9cad 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "org.ole.planet.myplanet" minSdkVersion 21 targetSdkVersion 34 - versionCode 1652 - versionName "0.16.52" + versionCode 1653 + versionName "0.16.53" ndkVersion '21.3.6528147' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true From 40d20bcf3c61aecfb32488d80d559d3122efb925 Mon Sep 17 00:00:00 2001 From: Elijah Whang <59347000+ewhang5@users.noreply.github.com> Date: Wed, 3 Jul 2024 15:54:09 -0500 Subject: [PATCH 3/4] actions: less warnings is more (fixes #3764) (#3765) Co-authored-by: dogi <dogi@users.noreply.github.com> --- app/build.gradle | 4 ++-- .../myplanet/ui/helpwanted/HelpWantedFragment.kt | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 881dcc9cad..362b09d843 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "org.ole.planet.myplanet" minSdkVersion 21 targetSdkVersion 34 - versionCode 1653 - versionName "0.16.53" + versionCode 1654 + versionName "0.16.54" ndkVersion '21.3.6528147' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true diff --git a/app/src/main/java/org/ole/planet/myplanet/ui/helpwanted/HelpWantedFragment.kt b/app/src/main/java/org/ole/planet/myplanet/ui/helpwanted/HelpWantedFragment.kt index c4fb467168..2bfec64605 100644 --- a/app/src/main/java/org/ole/planet/myplanet/ui/helpwanted/HelpWantedFragment.kt +++ b/app/src/main/java/org/ole/planet/myplanet/ui/helpwanted/HelpWantedFragment.kt @@ -2,11 +2,14 @@ package org.ole.planet.myplanet.ui.helpwanted import android.content.Context import android.content.SharedPreferences +import android.os.Build import android.os.Bundle import android.text.Html import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.annotation.RequiresApi +import androidx.core.text.HtmlCompat import androidx.fragment.app.Fragment import com.google.gson.JsonObject import com.google.gson.JsonParser.parseString @@ -26,6 +29,7 @@ class HelpWantedFragment : Fragment() { return fragmentHelpWantedBinding.root } + @RequiresApi(Build.VERSION_CODES.N) override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) val boldName = "<b>" + getString(R.string.name_colon) + "</b>" @@ -33,9 +37,9 @@ class HelpWantedFragment : Fragment() { val boldPhone = "<b>" + getString(R.string.phone_number_colon) + "</b>" if (manager != null) { fragmentHelpWantedBinding.llData.visibility = View.VISIBLE - fragmentHelpWantedBinding.tvName.text = Html.fromHtml(boldName + getString("name", manager)) - fragmentHelpWantedBinding.tvEmail.text = Html.fromHtml(boldEmail + getString("name", manager)) - fragmentHelpWantedBinding.tvPhone.text = Html.fromHtml(boldPhone + getString("phoneNumber", manager)) + fragmentHelpWantedBinding.tvName.text = Html.fromHtml(boldName + getString("name", manager), HtmlCompat.FROM_HTML_MODE_LEGACY) + fragmentHelpWantedBinding.tvEmail.text = Html.fromHtml(boldEmail + getString("name", manager), HtmlCompat.FROM_HTML_MODE_LEGACY) + fragmentHelpWantedBinding.tvPhone.text = Html.fromHtml(boldPhone + getString("phoneNumber", manager), HtmlCompat.FROM_HTML_MODE_LEGACY) } else { fragmentHelpWantedBinding.llData.visibility = View.GONE fragmentHelpWantedBinding.tvNodata.setText(R.string.no_data_available) From 036b1202407c4f97931c854bdb68d619a47d565d Mon Sep 17 00:00:00 2001 From: Elijah Whang <59347000+ewhang5@users.noreply.github.com> Date: Wed, 3 Jul 2024 16:17:10 -0500 Subject: [PATCH 4/4] chats: smoother text (fixes #3766) (#3767) Co-authored-by: dogi <dogi@users.noreply.github.com> --- app/build.gradle | 4 +-- .../planet/myplanet/ui/chat/ChatAdapter.kt | 31 ++++++++++--------- .../myplanet/ui/chat/ChatDetailFragment.kt | 28 ++++++++--------- .../ui/chat/ChatHistoryListAdapter.kt | 2 +- .../ui/chat/ChatHistoryListFragment.kt | 6 ++-- app/src/main/res/values-ar/strings.xml | 2 ++ app/src/main/res/values-es/strings.xml | 2 ++ app/src/main/res/values-fr/strings.xml | 2 ++ app/src/main/res/values-ne/strings.xml | 2 ++ app/src/main/res/values-so/strings.xml | 2 ++ app/src/main/res/values/strings.xml | 2 ++ 11 files changed, 48 insertions(+), 35 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 362b09d843..f712ee31ab 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "org.ole.planet.myplanet" minSdkVersion 21 targetSdkVersion 34 - versionCode 1654 - versionName "0.16.54" + versionCode 1655 + versionName "0.16.55" ndkVersion '21.3.6528147' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true diff --git a/app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatAdapter.kt b/app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatAdapter.kt index a327aa6c5a..d544fd62f4 100644 --- a/app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatAdapter.kt +++ b/app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatAdapter.kt @@ -8,6 +8,7 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView +import org.ole.planet.myplanet.R import org.ole.planet.myplanet.databinding.ItemAiResponseMessageBinding import org.ole.planet.myplanet.databinding.ItemUserMessageBinding @@ -16,8 +17,8 @@ class ChatAdapter(private val chatList: ArrayList<String>, val context: Context, private lateinit var textAiMessageBinding: ItemAiResponseMessageBinding var responseSource: Int = RESPONSE_SOURCE_UNKNOWN - private val VIEW_TYPE_QUERY = 1 - private val VIEW_TYPE_RESPONSE = 2 + private val viewTypeQuery = 1 + private val viewTypeResponse = 2 companion object { const val RESPONSE_SOURCE_SHARED_VIEW_MODEL = 1 const val RESPONSE_SOURCE_NETWORK = 2 @@ -29,17 +30,17 @@ class ChatAdapter(private val chatList: ArrayList<String>, val context: Context, } } - class ResponseViewHolder(private val textAiMessageBinding: ItemAiResponseMessageBinding) : RecyclerView.ViewHolder(textAiMessageBinding.root) { + class ResponseViewHolder(private val textAiMessageBinding: ItemAiResponseMessageBinding, val context: Context) : RecyclerView.ViewHolder(textAiMessageBinding.root) { fun bind(response: String, responseSource: Int) { if(responseSource == RESPONSE_SOURCE_NETWORK){ val typingDelayMillis = 10L val typingAnimationDurationMillis = response.length * typingDelayMillis - textAiMessageBinding.textGchatMessageOther.text = "" + textAiMessageBinding.textGchatMessageOther.text = context.getString(R.string.empty_text) Handler(Looper.getMainLooper()).postDelayed({ - animateTyping(response, typingDelayMillis) + animateTyping(response) }, typingAnimationDurationMillis) } else if(responseSource == RESPONSE_SOURCE_SHARED_VIEW_MODEL){ - if (response != "") { + if (response.isNotEmpty()) { textAiMessageBinding.textGchatMessageOther.text = response } else{ textAiMessageBinding.textGchatMessageOther.visibility = View.GONE @@ -47,18 +48,18 @@ class ChatAdapter(private val chatList: ArrayList<String>, val context: Context, } } - private fun animateTyping(response: String, typingDelayMillis: Long) { + private fun animateTyping(response: String) { var currentIndex = 0 val typingRunnable = object : Runnable { override fun run() { if (currentIndex < response.length) { textAiMessageBinding.textGchatMessageOther.text = response.substring(0, currentIndex + 1) currentIndex++ - Handler(Looper.getMainLooper()).postDelayed(this, typingDelayMillis) + Handler(Looper.getMainLooper()).postDelayed(this, 10L) } } } - Handler(Looper.getMainLooper()).postDelayed(typingRunnable, typingDelayMillis) + Handler(Looper.getMainLooper()).postDelayed(typingRunnable, 10L) } } @@ -90,18 +91,18 @@ class ChatAdapter(private val chatList: ArrayList<String>, val context: Context, } override fun getItemViewType(position: Int): Int { - return if (position % 2 == 0) VIEW_TYPE_QUERY else VIEW_TYPE_RESPONSE + return if (position % 2 == 0) viewTypeQuery else viewTypeResponse } override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder { return when (viewType) { - VIEW_TYPE_QUERY -> { + viewTypeQuery -> { textUserMessageBinding = ItemUserMessageBinding.inflate(LayoutInflater.from(context), parent, false) QueryViewHolder(textUserMessageBinding) } - VIEW_TYPE_RESPONSE -> { + viewTypeResponse -> { textAiMessageBinding = ItemAiResponseMessageBinding.inflate(LayoutInflater.from(context), parent, false) - ResponseViewHolder(textAiMessageBinding) + ResponseViewHolder(textAiMessageBinding, context) } else -> throw IllegalArgumentException("Invalid view type") } @@ -111,11 +112,11 @@ class ChatAdapter(private val chatList: ArrayList<String>, val context: Context, val chatItem = chatList[position] Log.d("ChatAdapter", "chatList: $chatList") when (holder.itemViewType) { - VIEW_TYPE_QUERY -> { + viewTypeQuery -> { val queryViewHolder = holder as QueryViewHolder queryViewHolder.bind(chatItem) } - VIEW_TYPE_RESPONSE -> { + viewTypeResponse -> { val responseViewHolder = holder as ResponseViewHolder responseViewHolder.bind(chatItem, responseSource) } diff --git a/app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatDetailFragment.kt b/app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatDetailFragment.kt index 91e62b18b4..f5cc74baec 100644 --- a/app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatDetailFragment.kt +++ b/app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatDetailFragment.kt @@ -123,12 +123,12 @@ class ChatDetailFragment : Fragment() { } } - sharedViewModel.getSelected_id().observe(viewLifecycleOwner) { selected_id -> - _id = selected_id + sharedViewModel.getSelected_id().observe(viewLifecycleOwner) { selectedId -> + _id = selectedId } - sharedViewModel.getSelected_rev().observe(viewLifecycleOwner) { selected_rev -> - _rev = selected_rev + sharedViewModel.getSelected_rev().observe(viewLifecycleOwner) { selectedRev -> + _rev = selectedRev } view.post { clearChatDetail() @@ -292,7 +292,7 @@ class ChatDetailFragment : Fragment() { } } else { fragmentChatDetailBinding.textGchatIndicator.visibility = View.VISIBLE - fragmentChatDetailBinding.textGchatIndicator.text = "${responseBody.message}" + fragmentChatDetailBinding.textGchatIndicator.text = context?.getString(R.string.message_placeholder, responseBody.message) val jsonObject = JsonObject() jsonObject.addProperty("_rev", "") jsonObject.addProperty("_id", "") @@ -361,7 +361,7 @@ class ChatDetailFragment : Fragment() { RealmChatHistory.insert(mRealm, jsonObject) } fragmentChatDetailBinding.textGchatIndicator.visibility = View.VISIBLE - fragmentChatDetailBinding.textGchatIndicator.text = "${t.message}" + fragmentChatDetailBinding.textGchatIndicator.text = context?.getString(R.string.message_placeholder, t.message) fragmentChatDetailBinding.buttonGchatSend.isEnabled = true fragmentChatDetailBinding.editGchatMessage.isEnabled = true fragmentChatDetailBinding.imageGchatLoading.visibility = View.INVISIBLE @@ -369,7 +369,7 @@ class ChatDetailFragment : Fragment() { }) } - private fun continueChatRequest(content: RequestBody, _id: String, query: String) { + private fun continueChatRequest(content: RequestBody, id: String, query: String) { fragmentChatDetailBinding.buttonGchatSend.isEnabled = false fragmentChatDetailBinding.editGchatMessage.isEnabled = false fragmentChatDetailBinding.imageGchatLoading.visibility = View.VISIBLE @@ -385,16 +385,16 @@ class ChatDetailFragment : Fragment() { mAdapter.responseSource = ChatAdapter.RESPONSE_SOURCE_NETWORK mAdapter.addResponse(chatResponse) _rev = "${response.body()?.couchDBResponse?.rev}" - continueConversationRealm(_id, query, chatResponse) + continueConversationRealm(id, query, chatResponse) } } else { fragmentChatDetailBinding.textGchatIndicator.visibility = View.VISIBLE - fragmentChatDetailBinding.textGchatIndicator.text = "${responseBody.message}" + fragmentChatDetailBinding.textGchatIndicator.text = context?.getString(R.string.message_placeholder, responseBody.message) } } else { fragmentChatDetailBinding.textGchatIndicator.visibility = View.VISIBLE fragmentChatDetailBinding.textGchatIndicator.text = getString(R.string.request_failed_please_retry) - continueConversationRealm(_id, query, "") + continueConversationRealm(id, query, "") } fragmentChatDetailBinding.buttonGchatSend.isEnabled = true @@ -403,9 +403,9 @@ class ChatDetailFragment : Fragment() { } override fun onFailure(call: Call<ChatModel>, t: Throwable) { - continueConversationRealm(_id, query, "") + continueConversationRealm(id, query, "") fragmentChatDetailBinding.textGchatIndicator.visibility = View.VISIBLE - fragmentChatDetailBinding.textGchatIndicator.text = "${t.message}" + fragmentChatDetailBinding.textGchatIndicator.text = context?.getString(R.string.message_placeholder, t.message) fragmentChatDetailBinding.buttonGchatSend.isEnabled = true fragmentChatDetailBinding.editGchatMessage.isEnabled = true fragmentChatDetailBinding.imageGchatLoading.visibility = View.INVISIBLE @@ -413,9 +413,9 @@ class ChatDetailFragment : Fragment() { }) } - private fun continueConversationRealm(_id:String, query:String, chatResponse:String) { + private fun continueConversationRealm(id:String, query:String, chatResponse:String) { try { - addConversationToChatHistory(mRealm, _id, query, chatResponse) + addConversationToChatHistory(mRealm, id, query, chatResponse) mRealm.commitTransaction() } catch (e: Exception) { e.printStackTrace() diff --git a/app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatHistoryListAdapter.kt b/app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatHistoryListAdapter.kt index 8026674585..75b590868b 100644 --- a/app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatHistoryListAdapter.kt +++ b/app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatHistoryListAdapter.kt @@ -43,7 +43,7 @@ class ChatHistoryListAdapter(var context: Context, private var chatHistory: List private var newsList: RealmResults<RealmNews>? = null interface ChatHistoryItemClickListener { - fun onChatHistoryItemClicked(conversations: RealmList<Conversation>?, _id: String, _rev: String?) + fun onChatHistoryItemClicked(conversations: RealmList<Conversation>?, id: String, rev: String?) } fun setChatHistoryItemClickListener(listener: ChatHistoryItemClickListener) { diff --git a/app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatHistoryListFragment.kt b/app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatHistoryListFragment.kt index f4702e943d..513d47cb2f 100644 --- a/app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatHistoryListFragment.kt +++ b/app/src/main/java/org/ole/planet/myplanet/ui/chat/ChatHistoryListFragment.kt @@ -75,10 +75,10 @@ class ChatHistoryListFragment : Fragment() { } val adapter = ChatHistoryListAdapter(requireContext(), list, this) adapter.setChatHistoryItemClickListener(object : ChatHistoryListAdapter.ChatHistoryItemClickListener { - override fun onChatHistoryItemClicked(conversations: RealmList<Conversation>?, _id: String, _rev:String?) { + override fun onChatHistoryItemClicked(conversations: RealmList<Conversation>?, id: String, rev:String?) { conversations?.let { sharedViewModel.setSelectedChatHistory(it) } - sharedViewModel.setSelected_id(_id) - _rev?.let { sharedViewModel.setSelected_rev(it) } + sharedViewModel.setSelected_id(id) + rev?.let { sharedViewModel.setSelected_rev(it) } fragmentChatHistoryListBinding.slidingPaneLayout.openPane() } diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 2a813cee63..228ad83a45 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -1051,5 +1051,7 @@ <string name="planet_name">كوكب %s</string> <string name="no_submissions">التقديمات غير متاحة</string> <string name="no_chats">لا توجد محادثات سابقة</string> + <string name="empty_text"></string> + <string name="message_placeholder">%s</string> </resources> diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index fabf3b6219..47d2cb2eec 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -1051,5 +1051,7 @@ <string name="planet_name">%s Planeta</string> <string name="no_submissions">envíos no disponibles</string> <string name="no_chats">no hay chats anteriores</string> + <string name="empty_text"></string> + <string name="message_placeholder">%s</string> </resources> diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 1dbbcabaec..1c26669b65 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -1051,5 +1051,7 @@ <string name="planet_name">%s planète</string> <string name="no_submissions">soumissions non disponibles</string> <string name="no_chats">aucune discussion précédente</string> + <string name="empty_text"></string> + <string name="message_placeholder">%s</string> </resources> diff --git a/app/src/main/res/values-ne/strings.xml b/app/src/main/res/values-ne/strings.xml index f71b84ba06..c75d0b674e 100644 --- a/app/src/main/res/values-ne/strings.xml +++ b/app/src/main/res/values-ne/strings.xml @@ -1051,5 +1051,7 @@ <string name="planet_name">%s ग्रह</string> <string name="no_submissions">पेशाहरू उपलब्ध छैनन्</string> <string name="no_chats">अघिल्ला कुराकानीहरू छैनन्</string> + <string name="empty_text"></string> + <string name="message_placeholder">%s</string> </resources> diff --git a/app/src/main/res/values-so/strings.xml b/app/src/main/res/values-so/strings.xml index d682020cd4..38c3ada43d 100644 --- a/app/src/main/res/values-so/strings.xml +++ b/app/src/main/res/values-so/strings.xml @@ -1051,5 +1051,7 @@ <string name="planet_name">%s Meerah</string> <string name="no_submissions">soo gudbin lama heli karo</string> <string name="no_chats">ma jiraan wada sheekaysi hore</string> + <string name="empty_text"></string> + <string name="message_placeholder">%s</string> </resources> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f2db6b44ee..599bfa36ff 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1051,5 +1051,7 @@ <string name="planet_name">%s\'s Planet</string> <string name="no_submissions">submissions not available</string> <string name="no_chats">no previous chats</string> + <string name="empty_text"></string> + <string name="message_placeholder">%s</string> </resources>