Merge branch 'master' into profile_feed
2
.gitignore
vendored
@ -14,3 +14,5 @@
|
|||||||
.cxx
|
.cxx
|
||||||
.idea
|
.idea
|
||||||
app/release
|
app/release
|
||||||
|
app/lint
|
||||||
|
lint
|
||||||
|
BIN
Screenshots/camera.xcf
Normal file
BIN
Screenshots/comment.xcf
Normal file
BIN
Screenshots/dark-theme.xcf
Normal file
BIN
Screenshots/edit.xcf
Normal file
BIN
Screenshots/feed.xcf
Normal file
BIN
Screenshots/multiAccount.xcf
Normal file
BIN
Screenshots/postCreation.xcf
Normal file
@ -110,6 +110,7 @@ dependencies {
|
|||||||
implementation "androidx.lifecycle:lifecycle-common-java8:2.3.0"
|
implementation "androidx.lifecycle:lifecycle-common-java8:2.3.0"
|
||||||
implementation "androidx.annotation:annotation:1.1.0"
|
implementation "androidx.annotation:annotation:1.1.0"
|
||||||
implementation 'androidx.gridlayout:gridlayout:1.0.0'
|
implementation 'androidx.gridlayout:gridlayout:1.0.0'
|
||||||
|
implementation "androidx.activity:activity-ktx:1.2.1"
|
||||||
|
|
||||||
// Use the most recent version of CameraX
|
// Use the most recent version of CameraX
|
||||||
def cameraX_version = '1.0.0-rc03'
|
def cameraX_version = '1.0.0-rc03'
|
||||||
@ -179,10 +180,9 @@ dependencies {
|
|||||||
|
|
||||||
implementation 'com.karumi:dexter:6.2.2'
|
implementation 'com.karumi:dexter:6.2.2'
|
||||||
|
|
||||||
implementation 'com.github.ligi.tracedroid:lib:3.0'
|
implementation 'com.github.ligi:tracedroid:4.1'
|
||||||
implementation 'com.github.ligi.tracedroid:supportemail:3.0'
|
|
||||||
|
|
||||||
implementation 'me.relex:circleindicator:2.1.4'
|
implementation 'me.relex:circleindicator:2.1.6'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Not in release, so not mentioned in licenses list
|
* Not in release, so not mentioned in licenses list
|
||||||
|
@ -110,11 +110,27 @@
|
|||||||
license: The Apache Software License, Version 2.0
|
license: The Apache Software License, Version 2.0
|
||||||
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0
|
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0
|
||||||
url: https://github.com/Yalantis/uCrop
|
url: https://github.com/Yalantis/uCrop
|
||||||
|
- artifact: com.github.ligi:tracedroid:+
|
||||||
|
name: tracedroid
|
||||||
|
copyrightHolder: ligi
|
||||||
|
license: The Apache Software License, Version 2.0
|
||||||
|
url: https://github.com/ligi/tracedroid
|
||||||
- artifact: com.github.ligi.tracedroid:supportemail:+
|
- artifact: com.github.ligi.tracedroid:supportemail:+
|
||||||
name: supportemail
|
name: supportemail
|
||||||
copyrightHolder: ligi
|
copyrightHolder: ligi
|
||||||
license: The Apache Software License, Version 2.0
|
license: The Apache Software License, Version 2.0
|
||||||
url: https://github.com/ligi/tracedroid
|
url: https://github.com/ligi/tracedroid
|
||||||
|
- artifact: com.github.ligi.tracedroid:lib:+
|
||||||
|
name: lib
|
||||||
|
copyrightHolder: ligi
|
||||||
|
license: The Apache Software License, Version 2.0
|
||||||
|
url: https://github.com/ligi/tracedroid
|
||||||
|
- artifact: com.jakewharton.timber:timber:+
|
||||||
|
name: timber
|
||||||
|
copyrightHolder: Jake Wharton and contributors
|
||||||
|
license: The Apache Software License, Version 2.0
|
||||||
|
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||||
|
url: https://github.com/JakeWharton/timber
|
||||||
- artifact: com.mikepenz:fastadapter-extensions-expandable:+
|
- artifact: com.mikepenz:fastadapter-extensions-expandable:+
|
||||||
name: fastadapter-extensions-expandable
|
name: fastadapter-extensions-expandable
|
||||||
copyrightHolder: Mike Penz and contributors
|
copyrightHolder: Mike Penz and contributors
|
||||||
@ -619,11 +635,6 @@
|
|||||||
license: The Apache Software License, Version 2.0
|
license: The Apache Software License, Version 2.0
|
||||||
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
|
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||||
url: https://github.com/mikepenz/Android-Iconics
|
url: https://github.com/mikepenz/Android-Iconics
|
||||||
- artifact: com.github.ligi.tracedroid:lib:+
|
|
||||||
name: lib
|
|
||||||
copyrightHolder: ligi
|
|
||||||
license: The Apache Software License, Version 2.0
|
|
||||||
url: https://github.com/ligi/tracedroid
|
|
||||||
- artifact: org.jetbrains.kotlinx:kotlinx-coroutines-android:+
|
- artifact: org.jetbrains.kotlinx:kotlinx-coroutines-android:+
|
||||||
name: kotlinx-coroutines-android
|
name: kotlinx-coroutines-android
|
||||||
copyrightHolder: JetBrains s.r.o. and contributors
|
copyrightHolder: JetBrains s.r.o. and contributors
|
||||||
@ -771,4 +782,15 @@
|
|||||||
license: The Apache Software License, Version 2.0
|
license: The Apache Software License, Version 2.0
|
||||||
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
|
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||||
url: http://developer.android.com/tools/extras/support-library.html
|
url: http://developer.android.com/tools/extras/support-library.html
|
||||||
|
- artifact: androidx.savedstate:savedstate-ktx:+
|
||||||
|
name: savedstate-ktx
|
||||||
|
copyrightHolder: Google Inc
|
||||||
|
license: The Apache Software License, Version 2.0
|
||||||
|
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||||
|
url: https://developer.android.com/jetpack/androidx/releases/savedstate#1.1.0
|
||||||
|
- artifact: androidx.tracing:tracing:+
|
||||||
|
name: tracing
|
||||||
|
copyrightHolder: Google Inc
|
||||||
|
license: The Apache Software License, Version 2.0
|
||||||
|
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||||
|
url: https://developer.android.com/jetpack/androidx/releases/tracing#1.0.0
|
@ -39,7 +39,7 @@ import com.mikepenz.materialdrawer.model.interfaces.*
|
|||||||
import com.mikepenz.materialdrawer.util.AbstractDrawerImageLoader
|
import com.mikepenz.materialdrawer.util.AbstractDrawerImageLoader
|
||||||
import com.mikepenz.materialdrawer.util.DrawerImageLoader
|
import com.mikepenz.materialdrawer.util.DrawerImageLoader
|
||||||
import com.mikepenz.materialdrawer.widget.AccountHeaderView
|
import com.mikepenz.materialdrawer.widget.AccountHeaderView
|
||||||
import org.ligi.tracedroid.sending.TraceDroidEmailSender
|
import org.ligi.tracedroid.sending.sendTraceDroidStackTracesIfExist
|
||||||
import retrofit2.HttpException
|
import retrofit2.HttpException
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ class MainActivity : BaseActivity() {
|
|||||||
launchActivity(LoginActivity(), firstTime = true)
|
launchActivity(LoginActivity(), firstTime = true)
|
||||||
finish()
|
finish()
|
||||||
} else {
|
} else {
|
||||||
TraceDroidEmailSender.sendStackTraces("contact@pixeldroid.org", this)
|
sendTraceDroidStackTracesIfExist("contact@pixeldroid.org", this)
|
||||||
|
|
||||||
setupDrawer()
|
setupDrawer()
|
||||||
|
|
||||||
|
@ -15,6 +15,8 @@ import android.view.View
|
|||||||
import android.view.View.INVISIBLE
|
import android.view.View.INVISIBLE
|
||||||
import android.view.View.VISIBLE
|
import android.view.View.VISIBLE
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
|
import androidx.activity.result.ActivityResult
|
||||||
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.core.net.toFile
|
import androidx.core.net.toFile
|
||||||
import androidx.core.net.toUri
|
import androidx.core.net.toUri
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
@ -43,10 +45,8 @@ import java.text.SimpleDateFormat
|
|||||||
import java.util.*
|
import java.util.*
|
||||||
import kotlin.collections.ArrayList
|
import kotlin.collections.ArrayList
|
||||||
import kotlin.math.ceil
|
import kotlin.math.ceil
|
||||||
import kotlin.properties.Delegates
|
|
||||||
|
|
||||||
private const val TAG = "Post Creation Activity"
|
private const val TAG = "Post Creation Activity"
|
||||||
private const val MORE_PICTURES_REQUEST_CODE = 0xffff
|
|
||||||
|
|
||||||
data class PhotoData(
|
data class PhotoData(
|
||||||
var imageUri: Uri,
|
var imageUri: Uri,
|
||||||
@ -61,7 +61,6 @@ class PostCreationActivity : BaseActivity() {
|
|||||||
private lateinit var accessToken: String
|
private lateinit var accessToken: String
|
||||||
private lateinit var pixelfedAPI: PixelfedAPI
|
private lateinit var pixelfedAPI: PixelfedAPI
|
||||||
|
|
||||||
private var positionResult = 0
|
|
||||||
private var user: UserDatabaseEntity? = null
|
private var user: UserDatabaseEntity? = null
|
||||||
private lateinit var instance: InstanceDatabaseEntity
|
private lateinit var instance: InstanceDatabaseEntity
|
||||||
|
|
||||||
@ -103,7 +102,7 @@ class PostCreationActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
carousel.maxEntries = instance.albumLimit
|
carousel.maxEntries = instance.albumLimit
|
||||||
carousel.addPhotoButtonCallback = {
|
carousel.addPhotoButtonCallback = {
|
||||||
addPhoto(applicationContext)
|
addPhoto()
|
||||||
}
|
}
|
||||||
carousel.updateDescriptionCallback = { position: Int, description: String ->
|
carousel.updateDescriptionCallback = { position: Int, description: String ->
|
||||||
photoData[position].imageDescription = description
|
photoData[position].imageDescription = description
|
||||||
@ -131,7 +130,7 @@ class PostCreationActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
binding.addPhotoButton.setOnClickListener {
|
binding.addPhotoButton.setOnClickListener {
|
||||||
addPhoto(it.context)
|
addPhoto()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.savePhotoButton.setOnClickListener {
|
binding.savePhotoButton.setOnClickListener {
|
||||||
@ -170,9 +169,19 @@ class PostCreationActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
for (i in 0 until count) {
|
for (i in 0 until count) {
|
||||||
clipData.getItemAt(i).uri.let {
|
clipData.getItemAt(i).uri.let {
|
||||||
|
val size = it.getSize()
|
||||||
|
photoData.add(PhotoData(imageUri = it, size = size))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the size of the file of the Uri, and opens a dialog in case it is too big.
|
||||||
|
*/
|
||||||
|
private fun Uri.getSize(): Long {
|
||||||
val size: Long =
|
val size: Long =
|
||||||
if (it.toString().startsWith("content")) {
|
if (toString().startsWith("content")) {
|
||||||
contentResolver.query(it, null, null, null, null)
|
contentResolver.query(this, null, null, null, null)
|
||||||
?.use { cursor ->
|
?.use { cursor ->
|
||||||
/* Get the column indexes of the data in the Cursor,
|
/* Get the column indexes of the data in the Cursor,
|
||||||
* move to the first row in the Cursor, get the data,
|
* move to the first row in the Cursor, get the data,
|
||||||
@ -183,32 +192,43 @@ class PostCreationActivity : BaseActivity() {
|
|||||||
cursor.getLong(sizeIndex)
|
cursor.getLong(sizeIndex)
|
||||||
} ?: 0
|
} ?: 0
|
||||||
} else {
|
} else {
|
||||||
it.toFile().length()
|
toFile().length()
|
||||||
}
|
}
|
||||||
|
|
||||||
val sizeInkBytes = ceil(size.toDouble() / 1000).toLong()
|
val sizeInkBytes = ceil(size.toDouble() / 1000).toLong()
|
||||||
if(sizeInkBytes > instance.maxPhotoSize || sizeInkBytes > instance.maxVideoSize){
|
if (sizeInkBytes > instance.maxPhotoSize || sizeInkBytes > instance.maxVideoSize) {
|
||||||
val maxSize = when {
|
val maxSize = when {
|
||||||
instance.maxPhotoSize != instance.maxVideoSize -> {
|
instance.maxPhotoSize != instance.maxVideoSize -> {
|
||||||
val type = contentResolver.getType(it)
|
val type = contentResolver.getType(this)
|
||||||
if(type?.startsWith("video/") == true){
|
if (type?.startsWith("video/") == true) {
|
||||||
instance.maxVideoSize
|
instance.maxVideoSize
|
||||||
} else instance.maxPhotoSize
|
} else instance.maxPhotoSize
|
||||||
}
|
}
|
||||||
else -> instance.maxPhotoSize
|
else -> instance.maxPhotoSize
|
||||||
}
|
}
|
||||||
AlertDialog.Builder(this).apply {
|
AlertDialog.Builder(this@PostCreationActivity).apply {
|
||||||
setMessage(getString(R.string.size_exceeds_instance_limit).format(photoData.size + 1, sizeInkBytes, maxSize))
|
setMessage(getString(R.string.size_exceeds_instance_limit, photoData.size + 1, sizeInkBytes, maxSize))
|
||||||
setNegativeButton(android.R.string.ok) { _, _ -> }
|
setNegativeButton(android.R.string.ok) { _, _ -> }
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
photoData.add(PhotoData(imageUri = it, size = size))
|
return size
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private val addPhotoResultContract = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result ->
|
||||||
|
if (result.resultCode == Activity.RESULT_OK && result.data?.clipData != null) {
|
||||||
|
result.data?.clipData?.let {
|
||||||
|
addPossibleImages(it)
|
||||||
|
}
|
||||||
|
binding.carousel.addData(photoData.map { CarouselItem(it.imageUri, it.imageDescription) })
|
||||||
|
} else if (result.resultCode != Activity.RESULT_CANCELED) {
|
||||||
|
Toast.makeText(applicationContext, "Error while adding images", Toast.LENGTH_SHORT).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun addPhoto(context: Context){
|
private fun addPhoto(){
|
||||||
val intent = Intent(context, CameraActivity::class.java)
|
addPhotoResultContract.launch(
|
||||||
this@PostCreationActivity.startActivityForResult(intent, MORE_PICTURES_REQUEST_CODE)
|
Intent(this, CameraActivity::class.java)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun savePicture(button: View, currentPosition: Int) {
|
private fun savePicture(button: View, currentPosition: Int) {
|
||||||
@ -334,7 +354,7 @@ class PostCreationActivity : BaseActivity() {
|
|||||||
binding.uploadError.visibility = View.VISIBLE
|
binding.uploadError.visibility = View.VISIBLE
|
||||||
if(e is HttpException){
|
if(e is HttpException){
|
||||||
binding.uploadErrorTextExplanation.text =
|
binding.uploadErrorTextExplanation.text =
|
||||||
getString(R.string.upload_error).format(e.code())
|
getString(R.string.upload_error, e.code())
|
||||||
binding.uploadErrorTextExplanation.visibility= VISIBLE
|
binding.uploadErrorTextExplanation.visibility= VISIBLE
|
||||||
} else {
|
} else {
|
||||||
binding.uploadErrorTextExplanation.visibility= View.GONE
|
binding.uploadErrorTextExplanation.visibility= View.GONE
|
||||||
@ -398,39 +418,27 @@ class PostCreationActivity : BaseActivity() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun edit(position: Int) {
|
private fun editResultContract(position: Int) = registerForActivityResult(ActivityResultContracts.StartActivityForResult()){
|
||||||
positionResult = position
|
result: ActivityResult? ->
|
||||||
|
if (result?.resultCode == Activity.RESULT_OK && result.data != null) {
|
||||||
|
photoData[position].apply {
|
||||||
|
imageUri = result.data!!.getStringExtra("result")!!.toUri()
|
||||||
|
size = imageUri.getSize()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.carousel.addData(photoData.map { CarouselItem(it.imageUri, it.imageDescription) })
|
||||||
|
|
||||||
|
photoData[position].progress = null
|
||||||
|
photoData[position].uploadId = null
|
||||||
|
} else if(result?.resultCode != Activity.RESULT_CANCELED){
|
||||||
|
Toast.makeText(applicationContext, "Error while editing", Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun edit(position: Int) {
|
||||||
val intent = Intent(this, PhotoEditActivity::class.java)
|
val intent = Intent(this, PhotoEditActivity::class.java)
|
||||||
.putExtra("picture_uri", photoData[position].imageUri)
|
.putExtra("picture_uri", photoData[position].imageUri)
|
||||||
.putExtra("no upload", false)
|
.putExtra("no upload", false)
|
||||||
startActivityForResult(intent, positionResult)
|
editResultContract(position).launch(intent)
|
||||||
}
|
|
||||||
|
|
||||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
|
||||||
super.onActivityResult(requestCode, resultCode, data)
|
|
||||||
if (requestCode == positionResult) {
|
|
||||||
if (resultCode == Activity.RESULT_OK && data != null) {
|
|
||||||
photoData[positionResult].imageUri = data.getStringExtra("result")!!.toUri()
|
|
||||||
|
|
||||||
binding.carousel.addData(photoData.map { CarouselItem(it.imageUri, it.imageDescription) })
|
|
||||||
|
|
||||||
photoData[positionResult].progress = null
|
|
||||||
photoData[positionResult].uploadId = null
|
|
||||||
} else if(resultCode != Activity.RESULT_CANCELED){
|
|
||||||
Toast.makeText(applicationContext, "Error while editing", Toast.LENGTH_SHORT).show()
|
|
||||||
}
|
|
||||||
} else if (requestCode == MORE_PICTURES_REQUEST_CODE) {
|
|
||||||
|
|
||||||
if (resultCode == Activity.RESULT_OK && data?.clipData != null) {
|
|
||||||
data.clipData?.let {
|
|
||||||
addPossibleImages(it)
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.carousel.addData(photoData.map { CarouselItem(it.imageUri, it.imageDescription) })
|
|
||||||
} else if(resultCode != Activity.RESULT_CANCELED){
|
|
||||||
Toast.makeText(applicationContext, "Error while adding images", Toast.LENGTH_SHORT).show()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -280,12 +280,12 @@ class StatusViewHolder(val binding: PostFragmentBinding) : RecyclerView.ViewHold
|
|||||||
//Update shown share count
|
//Update shown share count
|
||||||
binding.nshares.text = resp.getNShares(binding.root.context)
|
binding.nshares.text = resp.getNShares(binding.root.context)
|
||||||
binding.reblogger.isChecked = resp.reblogged!!
|
binding.reblogger.isChecked = resp.reblogged!!
|
||||||
} catch (exception: IOException) {
|
|
||||||
Log.e("REBLOG ERROR", exception.toString())
|
|
||||||
binding.reblogger.isChecked = false
|
|
||||||
} catch (exception: HttpException) {
|
} catch (exception: HttpException) {
|
||||||
Log.e("RESPONSE_CODE", exception.code().toString())
|
Log.e("RESPONSE_CODE", exception.code().toString())
|
||||||
binding.reblogger.isChecked = false
|
binding.reblogger.isChecked = false
|
||||||
|
} catch (exception: IOException) {
|
||||||
|
Log.e("REBLOG ERROR", exception.toString())
|
||||||
|
binding.reblogger.isChecked = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -302,12 +302,12 @@ class StatusViewHolder(val binding: PostFragmentBinding) : RecyclerView.ViewHold
|
|||||||
//Update shown share count
|
//Update shown share count
|
||||||
binding.nshares.text = resp.getNShares(binding.root.context)
|
binding.nshares.text = resp.getNShares(binding.root.context)
|
||||||
binding.reblogger.isChecked = resp.reblogged!!
|
binding.reblogger.isChecked = resp.reblogged!!
|
||||||
} catch (exception: IOException) {
|
|
||||||
Log.e("REBLOG ERROR", exception.toString())
|
|
||||||
binding.reblogger.isChecked = true
|
|
||||||
} catch (exception: HttpException) {
|
} catch (exception: HttpException) {
|
||||||
Log.e("RESPONSE_CODE", exception.code().toString())
|
Log.e("RESPONSE_CODE", exception.code().toString())
|
||||||
binding.reblogger.isChecked = true
|
binding.reblogger.isChecked = true
|
||||||
|
} catch (exception: IOException) {
|
||||||
|
Log.e("REBLOG ERROR", exception.toString())
|
||||||
|
binding.reblogger.isChecked = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -397,8 +397,18 @@ class StatusViewHolder(val binding: PostFragmentBinding) : RecyclerView.ViewHold
|
|||||||
try {
|
try {
|
||||||
api.deleteStatus("Bearer ${user.accessToken}", id)
|
api.deleteStatus("Bearer ${user.accessToken}", id)
|
||||||
binding.root.visibility = View.GONE
|
binding.root.visibility = View.GONE
|
||||||
} catch (exception: IOException) {
|
|
||||||
} catch (exception: HttpException) {
|
} catch (exception: HttpException) {
|
||||||
|
Toast.makeText(
|
||||||
|
binding.root.context,
|
||||||
|
binding.root.context.getString(R.string.delete_post_failed_error, exception.code()),
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
} catch (exception: IOException) {
|
||||||
|
Toast.makeText(
|
||||||
|
binding.root.context,
|
||||||
|
binding.root.context.getString(R.string.delete_post_failed_io_except),
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,10 +39,10 @@ class SearchPagingSource<T: FeedContent>(
|
|||||||
prevKey = null,
|
prevKey = null,
|
||||||
nextKey = if (repos.isEmpty()) null else (position ?: 0) + repos.size
|
nextKey = if (repos.isEmpty()) null else (position ?: 0) + repos.size
|
||||||
)
|
)
|
||||||
} catch (exception: IOException) {
|
|
||||||
LoadResult.Error(exception)
|
|
||||||
} catch (exception: HttpException) {
|
} catch (exception: HttpException) {
|
||||||
LoadResult.Error(exception)
|
LoadResult.Error(exception)
|
||||||
|
} catch (exception: IOException) {
|
||||||
|
LoadResult.Error(exception)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,12 +60,6 @@ class SearchDiscoverFragment : BaseFragment() {
|
|||||||
adapter = DiscoverRecyclerViewAdapter()
|
adapter = DiscoverRecyclerViewAdapter()
|
||||||
recycler.adapter = adapter
|
recycler.adapter = adapter
|
||||||
|
|
||||||
binding.discoverText.setCompoundDrawables(IconicsDrawable(requireContext(), GoogleMaterial.Icon.gmd_explore).apply {
|
|
||||||
sizeDp = 24
|
|
||||||
paddingDp = 20
|
|
||||||
color = IconicsColor.colorRes(R.color.colorDrawing)
|
|
||||||
}, null, null, null)
|
|
||||||
|
|
||||||
return binding.root
|
return binding.root
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ import androidx.preference.PreferenceManager
|
|||||||
import com.h.pixeldroid.utils.di.*
|
import com.h.pixeldroid.utils.di.*
|
||||||
import com.mikepenz.iconics.Iconics
|
import com.mikepenz.iconics.Iconics
|
||||||
import org.ligi.tracedroid.TraceDroid
|
import org.ligi.tracedroid.TraceDroid
|
||||||
|
import org.ligi.tracedroid.sending.sendTraceDroidStackTracesIfExist
|
||||||
|
|
||||||
|
|
||||||
class PixelDroidApplication: Application() {
|
class PixelDroidApplication: Application() {
|
||||||
@ -13,7 +14,9 @@ class PixelDroidApplication: Application() {
|
|||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
|
|
||||||
TraceDroid.init(this)
|
TraceDroid.init(this)
|
||||||
|
|
||||||
val sharedPreferences =
|
val sharedPreferences =
|
||||||
PreferenceManager.getDefaultSharedPreferences(this)
|
PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
setThemeFromPreferences(sharedPreferences, resources)
|
setThemeFromPreferences(sharedPreferences, resources)
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
package com.h.pixeldroid.utils.api.objects
|
||||||
|
|
||||||
|
data class Error(
|
||||||
|
val error: String?
|
||||||
|
)
|
@ -49,5 +49,5 @@ fun storeInstance(db: AppDatabase, nodeInfo: NodeInfo?, instance: Instance? = nu
|
|||||||
)
|
)
|
||||||
} ?: throw IllegalArgumentException("Cannot store instance where both are null")
|
} ?: throw IllegalArgumentException("Cannot store instance where both are null")
|
||||||
|
|
||||||
db.instanceDao().insertInstance(dbInstance)
|
db.instanceDao().insertOrUpdate(dbInstance)
|
||||||
}
|
}
|
@ -1,9 +1,6 @@
|
|||||||
package com.h.pixeldroid.utils.db.dao
|
package com.h.pixeldroid.utils.db.dao
|
||||||
|
|
||||||
import androidx.room.Dao
|
import androidx.room.*
|
||||||
import androidx.room.Insert
|
|
||||||
import androidx.room.OnConflictStrategy
|
|
||||||
import androidx.room.Query
|
|
||||||
import com.h.pixeldroid.utils.db.entities.InstanceDatabaseEntity
|
import com.h.pixeldroid.utils.db.entities.InstanceDatabaseEntity
|
||||||
|
|
||||||
@Dao
|
@Dao
|
||||||
@ -11,6 +8,19 @@ interface InstanceDao {
|
|||||||
@Query("SELECT * FROM instances")
|
@Query("SELECT * FROM instances")
|
||||||
fun getAll(): List<InstanceDatabaseEntity>
|
fun getAll(): List<InstanceDatabaseEntity>
|
||||||
|
|
||||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
/**
|
||||||
fun insertInstance(instance: InstanceDatabaseEntity)
|
* Insert an instance, if it already exists return -1
|
||||||
|
*/
|
||||||
|
@Insert(onConflict = OnConflictStrategy.IGNORE)
|
||||||
|
fun insertInstance(instance: InstanceDatabaseEntity): Long
|
||||||
|
|
||||||
|
@Update
|
||||||
|
fun updateInstance(instance: InstanceDatabaseEntity)
|
||||||
|
|
||||||
|
@Transaction
|
||||||
|
fun insertOrUpdate(instance: InstanceDatabaseEntity) {
|
||||||
|
if (insertInstance(instance) == -1L) {
|
||||||
|
updateInstance(instance)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -2,7 +2,6 @@ package com.h.pixeldroid.utils.di
|
|||||||
|
|
||||||
import com.h.pixeldroid.utils.api.PixelfedAPI
|
import com.h.pixeldroid.utils.api.PixelfedAPI
|
||||||
import com.h.pixeldroid.utils.db.AppDatabase
|
import com.h.pixeldroid.utils.db.AppDatabase
|
||||||
import com.h.pixeldroid.utils.db.addUser
|
|
||||||
import com.h.pixeldroid.utils.db.entities.UserDatabaseEntity
|
import com.h.pixeldroid.utils.db.entities.UserDatabaseEntity
|
||||||
import dagger.Module
|
import dagger.Module
|
||||||
import dagger.Provides
|
import dagger.Provides
|
||||||
@ -11,7 +10,6 @@ import okhttp3.*
|
|||||||
import retrofit2.Retrofit
|
import retrofit2.Retrofit
|
||||||
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory
|
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory
|
||||||
import retrofit2.converter.gson.GsonConverterFactory
|
import retrofit2.converter.gson.GsonConverterFactory
|
||||||
import java.lang.Exception
|
|
||||||
import javax.inject.Singleton
|
import javax.inject.Singleton
|
||||||
|
|
||||||
@Module
|
@Module
|
||||||
@ -74,9 +72,18 @@ class PixelfedAPIHolder(db: AppDatabase?){
|
|||||||
): PixelfedAPI {
|
): PixelfedAPI {
|
||||||
val newAPI = intermediate
|
val newAPI = intermediate
|
||||||
.baseUrl(user.instance_uri)
|
.baseUrl(user.instance_uri)
|
||||||
.client(OkHttpClient().newBuilder().authenticator(TokenAuthenticator(user, db)).build())
|
.client(
|
||||||
|
OkHttpClient().newBuilder().authenticator(TokenAuthenticator(user, db))
|
||||||
|
.addInterceptor {
|
||||||
|
it.request().newBuilder().run {
|
||||||
|
header("Accept", "application/json")
|
||||||
|
it.proceed(build())
|
||||||
|
}
|
||||||
|
}.build()
|
||||||
|
)
|
||||||
.build().create(PixelfedAPI::class.java)
|
.build().create(PixelfedAPI::class.java)
|
||||||
api = newAPI
|
api = newAPI
|
||||||
return newAPI
|
return newAPI
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
9
app/src/main/res/drawable/explore_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M12,10.9c-0.61,0 -1.1,0.49 -1.1,1.1s0.49,1.1 1.1,1.1c0.61,0 1.1,-0.49 1.1,-1.1s-0.49,-1.1 -1.1,-1.1zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM14.19,14.19L6,18l3.81,-8.19L18,6l-3.81,8.19z"
|
||||||
|
android:fillColor="@color/colorDrawing"/>
|
||||||
|
</vector>
|
@ -5,7 +5,9 @@
|
|||||||
android:id="@+id/coordinatorLayout"
|
android:id="@+id/coordinatorLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"/>
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progressBar"
|
||||||
|
@ -56,7 +56,8 @@
|
|||||||
android:text="@string/discover"
|
android:text="@string/discover"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/errorLayout" />
|
app:layout_constraintTop_toBottomOf="@id/errorLayout"
|
||||||
|
app:drawableStartCompat="@drawable/explore_24dp" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/discoverList"
|
android:id="@+id/discoverList"
|
||||||
|
@ -175,4 +175,10 @@
|
|||||||
<string name="instance_not_pixelfed_continue">Ados, jarraitu hala ere</string>
|
<string name="instance_not_pixelfed_continue">Ados, jarraitu hala ere</string>
|
||||||
<string name="instance_not_pixelfed_warning">Honek ez dirudi Pixelfed instantzia bat, aplikazioa ustekabeko moduetan huts egin dezake.</string>
|
<string name="instance_not_pixelfed_warning">Honek ez dirudi Pixelfed instantzia bat, aplikazioa ustekabeko moduetan huts egin dezake.</string>
|
||||||
<string name="verify_credentials">Ezin izan da erabiltzailearen informazioa eskuratu</string>
|
<string name="verify_credentials">Ezin izan da erabiltzailearen informazioa eskuratu</string>
|
||||||
|
<string name="delete_post_failed_io_except">Ezin izan da bidalketa ezabatu, konexioa egiaztatu dezakezu\?</string>
|
||||||
|
<string name="delete_post_failed_error">Ezin izan da bidalketa ezabatu, %1$d errorea</string>
|
||||||
|
<string name="upload_error">Zerbitzariak itzulitako errore-kodea: %1$d</string>
|
||||||
|
<string name="size_exceeds_instance_limit">Albumean %1$d zenbakia duen irudiaren tamainak instantziak onartutako gehienezko tamaina gainditzen du (%2$d kB ditu, eta muga %3$d kB da). Baliteke ezin igo ahal izatea.</string>
|
||||||
|
<string name="total_exceeds_album_limit">Zerbitzariak onartutako kopurua (%1$s) baino irudi gehiago aukeratu dituzu. Mugatik gorako irudiei ez ikusia egin zaie.</string>
|
||||||
|
<string name="api_not_enabled_dialog">APIa ez dago aktibo instantzia honetan. Jarri zure administratzailearekin kontaktuan aktibatzeko.</string>
|
||||||
</resources>
|
</resources>
|
@ -175,8 +175,10 @@
|
|||||||
\nمعنای دیگر این موضوع آن است که شما باید انتخاب کنید که از کدام کارساز یا «نمونه» از پیکسلفد استفاده میکنید. اگر چیزی در این باره نمیدانید میتوانید به این نشانی مراجعه کنید: https://pixelfed.org/join
|
\nمعنای دیگر این موضوع آن است که شما باید انتخاب کنید که از کدام کارساز یا «نمونه» از پیکسلفد استفاده میکنید. اگر چیزی در این باره نمیدانید میتوانید به این نشانی مراجعه کنید: https://pixelfed.org/join
|
||||||
\n
|
\n
|
||||||
\nبرای کسب اطلاعات بیشتر درباره پیکسلفد میتوانید این نشانی را ببینید: https://pixelfed.org</string>
|
\nبرای کسب اطلاعات بیشتر درباره پیکسلفد میتوانید این نشانی را ببینید: https://pixelfed.org</string>
|
||||||
<string name="upload_error">کد خطای دریافت شده از کارساز: %1$s</string>
|
<string name="upload_error">کد خطای دریافت شده از کارساز: %1$d</string>
|
||||||
<string name="size_exceeds_instance_limit">اندازه تصویر شماره %1$s در آلبوم از بیشینه اندازه مجاز در نمونه (%2$s کیلوبایت در مقابل آستانه مجاز %3$s کیلوبایت) تجاوز رده است.</string>
|
<string name="size_exceeds_instance_limit">اندازه تصویر شماره %1$d در آلبوم از بیشینه اندازه مجاز در نمونه (%2$d کیلوبایت در مقابل آستانه مجاز %3$d کیلوبایت) تجاوز رده است.</string>
|
||||||
<string name="total_exceeds_album_limit">تعداد تصاویر انتخاب شده شما بیش از بیشینه مجاز روی کارساز است (%1$s). تصاویر بیش از آن تعداد، نادیده گرفته شدهاند.</string>
|
<string name="total_exceeds_album_limit">تعداد تصاویر انتخاب شده شما بیش از بیشینه مجاز روی کارساز است (%1$s). تصاویر بیش از آن تعداد، نادیده گرفته شدهاند.</string>
|
||||||
<string name="api_not_enabled_dialog">روی این نمونه، API فعال نیست. با مدیر نمونه تماس گرفته و از او بخواهید آن را فعال کند.</string>
|
<string name="api_not_enabled_dialog">روی این نمونه، API فعال نیست. با مدیر نمونه تماس گرفته و از او بخواهید آن را فعال کند.</string>
|
||||||
|
<string name="delete_post_failed_io_except">نتوانستیم فرسته را پاک کنیم. به اینترنت وصل هستید؟</string>
|
||||||
|
<string name="delete_post_failed_error">نتوانستیم این فرسته را پاک کنیم. خطا: %1$d</string>
|
||||||
</resources>
|
</resources>
|
@ -138,8 +138,8 @@
|
|||||||
<string name="follows_title">Abonnements de %1$s</string>
|
<string name="follows_title">Abonnements de %1$s</string>
|
||||||
<string name="followers_title">Abonné·e·s de %1$s</string>
|
<string name="followers_title">Abonné·e·s de %1$s</string>
|
||||||
<string name="verify_credentials">Impossible d\'obtenir les informations sur l\'utilisateur</string>
|
<string name="verify_credentials">Impossible d\'obtenir les informations sur l\'utilisateur</string>
|
||||||
<string name="size_exceeds_instance_limit">La taille de l\'image n°%1$s dans l\'album dépasse la taille maximale autorisée (%2$s ko mais la limite est %3$s ko). Il se peut que vous ne puissiez pas la télécharger.</string>
|
<string name="size_exceeds_instance_limit">La taille de l\'image n°%1$d dans l\'album dépasse la taille maximale autorisée (%2$d ko mais la limite est %3$d ko). Il se peut que vous ne puissiez pas la télécharger.</string>
|
||||||
<string name="upload_error">Le serveur a retourné le code d\'erreur : %1$s</string>
|
<string name="upload_error">Le serveur a retourné le code d\'erreur : %1$d</string>
|
||||||
<string name="total_exceeds_album_limit">Vous avez choisi plus d\'images que le maximum autorisé par votre serveur (%1$s). Les images au delà de la limite ont été ignorées.</string>
|
<string name="total_exceeds_album_limit">Vous avez choisi plus d\'images que le maximum autorisé par votre serveur (%1$s). Les images au delà de la limite ont été ignorées.</string>
|
||||||
<string name="no_media_description">Ajouter une description du média ici…</string>
|
<string name="no_media_description">Ajouter une description du média ici…</string>
|
||||||
<string name="save_image_description">Enregistrer la description de l\'image</string>
|
<string name="save_image_description">Enregistrer la description de l\'image</string>
|
||||||
|
@ -159,8 +159,8 @@
|
|||||||
<string name="crop_button">Botón para recortar ou rotar a imaxe</string>
|
<string name="crop_button">Botón para recortar ou rotar a imaxe</string>
|
||||||
<string name="image_preview">Vista previa da imaxe a ser editada</string>
|
<string name="image_preview">Vista previa da imaxe a ser editada</string>
|
||||||
<string name="filter_thumbnail">Miniatura do filtro</string>
|
<string name="filter_thumbnail">Miniatura do filtro</string>
|
||||||
<string name="upload_error">Código de erro devolto polo servidor: %1$s</string>
|
<string name="upload_error">Código de erro devolto polo servidor: %1$d</string>
|
||||||
<string name="size_exceeds_instance_limit">O tamaño do número de imaxes %1$s no álbume supera o máximo permitido pola instancia (%2$s kB pero o límite é %3$s kB). É posible que non poidas subilas.</string>
|
<string name="size_exceeds_instance_limit">O tamaño do número de imaxes %1$d no álbume supera o máximo permitido pola instancia (%2$d kB pero o límite é %3$d kB). É posible que non poidas subilas.</string>
|
||||||
<string name="total_exceeds_album_limit">Elexiches máis imaxes das que permite o servidor (%1$s). As imaxes que superan o límite serán ignoradas.</string>
|
<string name="total_exceeds_album_limit">Elexiches máis imaxes das que permite o servidor (%1$s). As imaxes que superan o límite serán ignoradas.</string>
|
||||||
<string name="no_media_description">Engade aquí unha descrición…</string>
|
<string name="no_media_description">Engade aquí unha descrición…</string>
|
||||||
<string name="save_image_description">Gardar descrición da imaxe</string>
|
<string name="save_image_description">Gardar descrición da imaxe</string>
|
||||||
@ -179,4 +179,6 @@
|
|||||||
\nTamén significa que tes que escoller un servidor, ou \'instancia\' de Pixelfed para utilizar. Se non coñeces ningunha, mira aquí: https://pixelfed.org/join
|
\nTamén significa que tes que escoller un servidor, ou \'instancia\' de Pixelfed para utilizar. Se non coñeces ningunha, mira aquí: https://pixelfed.org/join
|
||||||
\n
|
\n
|
||||||
\nPara saber máis acerca de Pixelfed, podes mirar aquí: https://pixelfed.org</string>
|
\nPara saber máis acerca de Pixelfed, podes mirar aquí: https://pixelfed.org</string>
|
||||||
|
<string name="delete_post_failed_io_except">Non se puido eliminar a publicación, tes conexión a internet\?</string>
|
||||||
|
<string name="delete_post_failed_error">Non se puido eliminar a publicación, erro %1$d</string>
|
||||||
</resources>
|
</resources>
|
@ -165,8 +165,8 @@
|
|||||||
<item quantity="one">%d Mi piace</item>
|
<item quantity="one">%d Mi piace</item>
|
||||||
<item quantity="other">%d Mi piace</item>
|
<item quantity="other">%d Mi piace</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="upload_error">Codice di errore restituito dal server: %1$s</string>
|
<string name="upload_error">Codice di errore restituito dal server: %1$d</string>
|
||||||
<string name="size_exceeds_instance_limit">La dimensione del numero dell\'immagine %1$s nell\'album supera la dimensione massima consentita dall\'istanza (%2$s kB ma il limite è %3$s kB). Potresti non essere in grado di caricarla.</string>
|
<string name="size_exceeds_instance_limit">La dimensione del numero dell\'immagine %1$d nell\'album supera la dimensione massima consentita dall\'istanza (%2$d kB ma il limite è %3$d kB). Potresti non essere in grado di caricarla.</string>
|
||||||
<string name="total_exceeds_album_limit">Hai scelto più immagini del massimo che il server consente (%1$s). Le immagini oltre il limite sono state ignorate.</string>
|
<string name="total_exceeds_album_limit">Hai scelto più immagini del massimo che il server consente (%1$s). Le immagini oltre il limite sono state ignorate.</string>
|
||||||
<string name="no_media_description">Aggiungi una descrizione dell\'immagine qui…</string>
|
<string name="no_media_description">Aggiungi una descrizione dell\'immagine qui…</string>
|
||||||
<string name="save_image_description">Salva la descrizione dell\'immagine</string>
|
<string name="save_image_description">Salva la descrizione dell\'immagine</string>
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
<string name="follow_button_failed">Kunde inte visa följarknapp</string>
|
<string name="follow_button_failed">Kunde inte visa följarknapp</string>
|
||||||
<string name="follow_status_failed">Kunde inte hämta status för följare</string>
|
<string name="follow_status_failed">Kunde inte hämta status för följare</string>
|
||||||
<string name="comment">Kommentera</string>
|
<string name="comment">Kommentera</string>
|
||||||
<string name="comment_posted">Kommentar: %$s inlagd!</string>
|
<string name="comment_posted">Kommentar: %1$s inlagd!</string>
|
||||||
<string name="comment_error">Kommentarsfel!</string>
|
<string name="comment_error">Kommentarsfel!</string>
|
||||||
<string name="share_image">Dela bild</string>
|
<string name="share_image">Dela bild</string>
|
||||||
<string name="write_permission_share_pic">Du måste tillåta skrivrättigheter för att dela bilder!</string>
|
<string name="write_permission_share_pic">Du måste tillåta skrivrättigheter för att dela bilder!</string>
|
||||||
|
@ -18,8 +18,9 @@
|
|||||||
<item>বাংলা (বাংলাদেশ)</item>
|
<item>বাংলা (বাংলাদেশ)</item>
|
||||||
<item>Català</item>
|
<item>Català</item>
|
||||||
<item>Deutsch</item>
|
<item>Deutsch</item>
|
||||||
<item>Esperanto</item>
|
<item>Español</item>
|
||||||
<item>Euskara</item>
|
<item>Euskara</item>
|
||||||
|
<item>English</item>
|
||||||
<item>فارسی</item>
|
<item>فارسی</item>
|
||||||
<item>Français</item>
|
<item>Français</item>
|
||||||
<item>Gaeilge</item>
|
<item>Gaeilge</item>
|
||||||
@ -42,6 +43,7 @@
|
|||||||
<item>de</item>
|
<item>de</item>
|
||||||
<item>es</item>
|
<item>es</item>
|
||||||
<item>eu</item>
|
<item>eu</item>
|
||||||
|
<item>en</item>
|
||||||
<item>fa</item>
|
<item>fa</item>
|
||||||
<item>fr</item>
|
<item>fr</item>
|
||||||
<item>gl</item>
|
<item>gl</item>
|
||||||
|
@ -66,8 +66,8 @@ For more info about Pixelfed, you can check here: https://pixelfed.org"</string>
|
|||||||
<string name="save_image_description">Save image description</string>
|
<string name="save_image_description">Save image description</string>
|
||||||
<string name="no_media_description">Add a media description here…</string>
|
<string name="no_media_description">Add a media description here…</string>
|
||||||
<string name="total_exceeds_album_limit">You chose more images than the maximum your server allows (%1$s). Images beyond the limit have been ignored.</string>
|
<string name="total_exceeds_album_limit">You chose more images than the maximum your server allows (%1$s). Images beyond the limit have been ignored.</string>
|
||||||
<string name="size_exceeds_instance_limit">Size of image number %1$s in the album exceeds the maximum size allowed by the instance (%2$s kB but the limit is %3$s kB). You might not be able to upload it.</string>
|
<string name="size_exceeds_instance_limit">Size of image number %1$d in the album exceeds the maximum size allowed by the instance (%2$d kB but the limit is %3$d kB). You might not be able to upload it.</string>
|
||||||
<string name="upload_error">Error code returned by server: %1$s</string>
|
<string name="upload_error">Error code returned by server: %1$d</string>
|
||||||
|
|
||||||
|
|
||||||
<!-- Post editing -->
|
<!-- Post editing -->
|
||||||
@ -194,4 +194,6 @@ For more info about Pixelfed, you can check here: https://pixelfed.org"</string>
|
|||||||
<string name="help_translate">Help translate PixelDroid to your language:</string>
|
<string name="help_translate">Help translate PixelDroid to your language:</string>
|
||||||
<string name="issues_contribute">Report issues or contribute to the application:</string>
|
<string name="issues_contribute">Report issues or contribute to the application:</string>
|
||||||
<string name="mascot_description">Image showing a red panda, Pixelfed\'s mascot, using a phone</string>
|
<string name="mascot_description">Image showing a red panda, Pixelfed\'s mascot, using a phone</string>
|
||||||
|
<string name="delete_post_failed_error">Could not delete the post, error %1$d</string>
|
||||||
|
<string name="delete_post_failed_io_except">Could not delete the post, check your connection?</string>
|
||||||
</resources>
|
</resources>
|
26
build.gradle
@ -1,10 +1,18 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.4.21'
|
ext.kotlin_version = '1.4.31'
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
mavenCentral()
|
||||||
|
jcenter {
|
||||||
|
content {
|
||||||
|
// org.jetbrains.trove4j is only available in JCenter
|
||||||
|
//TODO remove JCenter repo:
|
||||||
|
// see issue https://gitlab.shinice.net/pixeldroid/PixelDroid/-/issues/278
|
||||||
|
includeGroup("org.jetbrains.trove4j")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.1.3'
|
classpath 'com.android.tools.build:gradle:4.1.3'
|
||||||
@ -18,9 +26,21 @@ buildscript {
|
|||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
mavenCentral()
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
|
jcenter {
|
||||||
|
content {
|
||||||
|
// info.androidhive:imagefilters is only available in JCenter
|
||||||
|
//TODO remove JCenter repo:
|
||||||
|
// see issue https://gitlab.shinice.net/pixeldroid/PixelDroid/-/issues/278
|
||||||
|
includeGroup("info.androidhive")
|
||||||
|
|
||||||
|
// org.jetbrains.trove4j is only available in JCenter
|
||||||
|
//TODO remove JCenter repo:
|
||||||
|
// see issue https://gitlab.shinice.net/pixeldroid/PixelDroid/-/issues/278
|
||||||
|
includeGroup("org.jetbrains.trove4j")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +1,3 @@
|
|||||||
PixelDroid is a Free/Libre and Open Source Android client for Pixelfed, the federated image sharing platform. One may upload new posts, search or interact with others inluding liking and sharing others' posts as well as leaving comments under them.
|
PixelDroid is a Free and Open Source Android client for Pixelfed, the federated image sharing platform.
|
||||||
|
|
||||||
|
One may upload new posts, search or interact with others inluding liking and sharing others' posts as well as leaving comments under them.
|
||||||
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 2.7 MiB |
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.6 MiB |
Before Width: | Height: | Size: 1017 KiB After Width: | Height: | Size: 2.8 MiB |
Before Width: | Height: | Size: 491 KiB After Width: | Height: | Size: 3.2 MiB |
After Width: | Height: | Size: 4.5 MiB |
After Width: | Height: | Size: 3.0 MiB |
After Width: | Height: | Size: 4.3 MiB |