Skip to content

Commit 3794404

Browse files
author
Prathieshna Vekneswaran
committed
Language Fixes and Upload Queue fixes
1 parent ff0e6b9 commit 3794404

File tree

3 files changed

+31
-32
lines changed

3 files changed

+31
-32
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ android {
4545
minSdk = 29
4646
//noinspection OldTargetApi
4747
targetSdk = 34
48-
versionCode = 30008
49-
versionName = "0.7.8"
48+
versionCode = 30010
49+
versionName = "4.0.0"
5050
multiDexEnabled = true
5151
vectorDrawables.useSupportLibrary = true
5252
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

app/src/main/java/net/opendasharchive/openarchive/db/UploadMediaAdapter.kt

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -176,38 +176,37 @@ class UploadMediaAdapter(
176176
if (pos < 0 || pos >= media.size) return
177177

178178
val item = media[pos]
179-
var undone = false
180-
181-
val snackbar =
182-
Snackbar.make(recyclerView, R.string.confirm_remove_media, Snackbar.LENGTH_LONG)
183-
snackbar.setAction(R.string.undo) { _ ->
184-
undone = true
185-
media.add(pos, item)
186-
187-
notifyItemInserted(pos)
179+
// var undone = false
180+
181+
// val snackbar = Snackbar.make(recyclerView, R.string.confirm_remove_media, Snackbar.LENGTH_LONG)
182+
// snackbar.setAction(R.string.undo) { _ ->
183+
// undone = true
184+
// media.add(pos, item)
185+
//
186+
// notifyItemInserted(pos)
187+
// }
188+
189+
// snackbar.addCallback(object : Snackbar.Callback() {
190+
// override fun onDismissed(transientBottomBar: Snackbar?, event: Int) {
191+
// if (!undone) {
192+
val collection = item.collection
193+
194+
// Delete collection along with the item, if the collection
195+
// would become empty.
196+
if ((collection?.size ?: 0) < 2) {
197+
collection?.delete()
198+
} else {
199+
item.delete()
188200
}
189201

190-
snackbar.addCallback(object : Snackbar.Callback() {
191-
override fun onDismissed(transientBottomBar: Snackbar?, event: Int) {
192-
if (!undone) {
193-
val collection = item.collection
194-
195-
// Delete collection along with the item, if the collection
196-
// would become empty.
197-
if ((collection?.size ?: 0) < 2) {
198-
collection?.delete()
199-
} else {
200-
item.delete()
201-
}
202-
203-
BroadcastManager.postDelete(recyclerView.context, item.id)
204-
}
205-
206-
super.onDismissed(transientBottomBar, event)
207-
}
208-
})
202+
BroadcastManager.postDelete(recyclerView.context, item.id)
203+
// }
204+
//
205+
// super.onDismissed(transientBottomBar, event)
206+
// }
207+
// })
209208

210-
snackbar.show()
209+
// snackbar.show()
211210

212211
removeItem(item.id)
213212

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@
310310
<!-- <string name="intro_text_archive">Keep your media verifiable, safe and organized for the long-term by uploading it to private or public servers like Nextcloud or the Internet Archive.&lt;br&gt;Communicate your intentions for future use by adding a &lt;a href="%1$s" style="text-decoration: underline;"&gt;Creative Commons License&lt;/a&gt;.</string>-->
311311

312312
<string name="intro_link_archive" translatable="false">https://creativecommons.org</string>
313-
<string name="intro_text_verify"><![CDATA[استوثق من وسائطك وتحقق منها باستخدام تلبيد التجزئة sha256 ووضع <a href=\"%1$s\"><u>ProofMode</u></a>.]]></string>
313+
<string name="intro_text_verify"><![CDATA[Authenticate and verify your media with sha256 hashes and <a href=\"%1$s\"><u>ProofMode</u></a>.]]></string>
314314
<string name="intro_link_verify" translatable="false">https://proofmode.org</string>
315315
<string name="intro_text_encrypt_old">Automatically upload over TLS (Transport Layer Security) and use Orbot to protect your media in transit over the Tor network.</string>
316316
<string name="intro_text_encrypt"><![CDATA[<b><i>Save</i></b> always uploads over TLS (Transport Layer Security) to protect your media in transit.<br>To further enhance security, enable <a href=\"%1$s\"><u>Orbot</u></a> to prevent interception of your media from your phone to the server.]]></string>

0 commit comments

Comments
 (0)