mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Add support for separate story view receipt control.
This reverts commit 1046265d23.
This commit is contained in:
committed by
Cody Henthorne
parent
2f2711c9a3
commit
ca36eaacce
@@ -120,6 +120,18 @@ public class Data {
|
||||
return integerArrays.get(key);
|
||||
}
|
||||
|
||||
public List<Integer> getIntegerArrayAsList(@NonNull String key) {
|
||||
throwIfAbsent(integerArrays, key);
|
||||
|
||||
int[] array = Objects.requireNonNull(integerArrays.get(key));
|
||||
List<Integer> ints = new ArrayList<>(array.length);
|
||||
|
||||
for (int l : array) {
|
||||
ints.add(l);
|
||||
}
|
||||
|
||||
return ints;
|
||||
}
|
||||
|
||||
public boolean hasLong(@NonNull String key) {
|
||||
return longs.containsKey(key);
|
||||
@@ -295,6 +307,17 @@ public class Data {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder putIntegerListAsArray(@NonNull String key, @NonNull List<Integer> value) {
|
||||
int[] ints = new int[value.size()];
|
||||
|
||||
for (int i = 0; i < value.size(); i++) {
|
||||
ints[i] = value.get(i);
|
||||
}
|
||||
|
||||
integerArrays.put(key, ints);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder putInt(@NonNull String key, int value) {
|
||||
integers.put(key, value);
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user