mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Add sending and error states for story group replies.
This commit is contained in:
committed by
Alex Hart
parent
a29bc1da8c
commit
2a91c67c51
@@ -8,7 +8,6 @@ import org.signal.core.util.concurrent.SignalExecutors
|
||||
import org.thoughtcrime.securesms.R
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase
|
||||
import org.thoughtcrime.securesms.database.model.MessageRecord
|
||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore
|
||||
import org.thoughtcrime.securesms.sms.MessageSender
|
||||
import org.thoughtcrime.securesms.util.task.ProgressDialogAsyncTask
|
||||
@@ -75,7 +74,7 @@ object DeleteDialog {
|
||||
private fun deleteForEveryone(messageRecords: Set<MessageRecord>, emitter: SingleEmitter<Boolean>) {
|
||||
SignalExecutors.BOUNDED.execute {
|
||||
messageRecords.forEach { message ->
|
||||
MessageSender.sendRemoteDelete(ApplicationDependencies.getApplication(), message.id, message.isMms)
|
||||
MessageSender.sendRemoteDelete(message.id, message.isMms)
|
||||
}
|
||||
|
||||
emitter.onSuccess(false)
|
||||
|
||||
@@ -1,12 +1,24 @@
|
||||
package org.thoughtcrime.securesms.util
|
||||
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.constraintlayout.widget.ConstraintSet
|
||||
|
||||
var View.visible: Boolean
|
||||
get() {
|
||||
return this.visibility == View.VISIBLE
|
||||
}
|
||||
|
||||
set(value) {
|
||||
this.visibility = if (value) View.VISIBLE else View.GONE
|
||||
}
|
||||
|
||||
fun View.padding(left: Int = paddingLeft, top: Int = paddingTop, right: Int = paddingRight, bottom: Int = paddingBottom) {
|
||||
setPadding(left, top, right, bottom)
|
||||
}
|
||||
|
||||
fun ConstraintLayout.changeConstraints(change: ConstraintSet.() -> Unit) {
|
||||
val set = ConstraintSet()
|
||||
set.clone(this)
|
||||
set.change()
|
||||
set.applyTo(this)
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public abstract class MappingViewHolder<Model> extends RecyclerView.ViewHolder {
|
||||
payload = new LinkedList<>();
|
||||
}
|
||||
|
||||
public <T extends View> T findViewById(@IdRes int id) {
|
||||
public final <T extends View> T findViewById(@IdRes int id) {
|
||||
return itemView.findViewById(id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user