fix dnr and dnt
This commit is contained in:
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
|
||||
public class DNRInjector {
|
||||
public static void inject(Dialog dialog, List<DialogAction> list) {
|
||||
int peerId = dialog.a();
|
||||
int peerId = dialog.getId();
|
||||
|
||||
if (isDnrEnabledFor(peerId)) {
|
||||
list.add(DialogAction.valueOf("DNR_OFF"));
|
||||
@@ -38,7 +38,7 @@ public class DNRInjector {
|
||||
}
|
||||
|
||||
public static boolean onClick(Dialog dialog, DialogAction action) {
|
||||
var id = dialog.a();
|
||||
var id = dialog.getId();
|
||||
|
||||
if (action == DialogAction.valueOf("DNR_ON")) {
|
||||
setDnr(dialog, true);
|
||||
@@ -60,11 +60,11 @@ public class DNRInjector {
|
||||
}
|
||||
|
||||
public static void setDnr(Dialog dialog, boolean value) {
|
||||
hookDNR(dialog.a());
|
||||
hookDNR(dialog.getId());
|
||||
}
|
||||
|
||||
public static void setDnt(Dialog dialog, boolean value) {
|
||||
hookDNT(dialog.a());
|
||||
hookDNT(dialog.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,16 +42,16 @@ public class DNRModule {
|
||||
|
||||
public static boolean isDnrEnabledFor(Dialog dialog) {
|
||||
if (dialog == null) return false;
|
||||
return isDnrEnabledFor(dialog.a());
|
||||
return isDnrEnabledFor(dialog.getId());
|
||||
}
|
||||
|
||||
public static boolean isDntEnabledFor(Dialog dialog) {
|
||||
if (dialog == null) return false;
|
||||
return isDntEnabledFor(dialog.a());
|
||||
return isDntEnabledFor(dialog.getId());
|
||||
}
|
||||
|
||||
public static void hookRead(Dialog dialog) {
|
||||
makeRequest("https://" + getApiCom() + "/method/messages.markAsRead?start_message_id=" + dialog.lastMsgVkId + "&peer_id=" + dialog.a() + "&v=5.91&access_token=" + getUserToken(), response -> {
|
||||
makeRequest("https://" + getApiCom() + "/method/messages.markAsRead?start_message_id=" + dialog.F1() + "&peer_id=" + dialog.getId() + "&v=5.91&access_token=" + getUserToken(), response -> {
|
||||
ToastUtils.a("Чат помечен как прочитанный!");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
|
||||
# instance fields
|
||||
.field private final b:I
|
||||
.field public final b:I
|
||||
|
||||
.field private final c:Lcom/vk/im/engine/models/typing/ComposingType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user