Merge pull request #412 from wkawecki/master

meshtastic#73 'Resend Button' on message selection
This commit is contained in:
Andre Kirchhoff
2022-04-19 14:59:37 -03:00
committed by GitHub
5 changed files with 36 additions and 0 deletions

View File

@@ -305,6 +305,17 @@ class MessagesFragment : Fragment(), Logging {
actionMode?.title = selectedList.size.toString()
notifyDataSetChanged()
}
R.id.resendButton -> {
debug("User clicked resendButton")
var resendText = ""
selectedList.forEach {
resendText = resendText + it.text + System.lineSeparator()
}
if (resendText!="")
resendText = resendText.substring(0, resendText.length - 1)
binding.messageInputText.setText(resendText)
mode.finish()
}
}
return true
}

View File

@@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:pathData="M10,17c0,-3.31 2.69,-6 6,-6h3V5h-2v3H7V5H5v14h5v-2z"
android:strokeAlpha="0.3"
android:fillColor="@android:color/white"
android:fillAlpha="0.3"/>
<path
android:pathData="M10,19L5,19L5,5h2v3h10L17,5h2v6h2L21,5c0,-1.1 -0.9,-2 -2,-2h-4.18C14.4,1.84 13.3,1 12,1s-2.4,0.84 -2.82,2L5,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h5v-2zM12,3c0.55,0 1,0.45 1,1s-0.45,1 -1,1s-1,-0.45 -1,-1s0.45,-1 1,-1z"
android:fillColor="@android:color/white"/>
<path
android:pathData="m18.01,13l-1.42,1.41l1.58,1.58H12v2h6.17l-1.58,1.59l1.42,1.41l3.99,-4z"
android:fillColor="@android:color/white"/>
</vector>

View File

@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/resendButton"
android:icon="@drawable/ic_twotone_content_paste_go_24"
android:title="@string/resend"
app:showAsAction="ifRoom" />
<item
android:id="@+id/deleteButton"
android:icon="@drawable/ic_twotone_delete_24"

View File

@@ -137,4 +137,5 @@ Jeśli jesteś zainteresowany opłaceniem przez nas mapboxa (lub przejściem do
<string name="allow_will_show">Zezwól (pokaże okno dialogowe)</string>
<string name="preferences_language">Język (wymagany restart)</string>
<string name="preferences_system_default">Domyślny systemu</string>
<string name="resend">Ponów</string>
</resources>

View File

@@ -140,4 +140,5 @@
<string name="download_failed">Unable to download style pack</string>
<string name="preferences_language">Language (restart needed)</string>
<string name="preferences_system_default">System default</string>
<string name="resend">Resend</string>
</resources>