Quick sort senders/recipients

This commit is contained in:
M66B
2023-12-11 17:04:35 +01:00
parent 3a122b88ef
commit efc29f28c5
4 changed files with 63 additions and 6 deletions

View File

@@ -3030,6 +3030,23 @@ public abstract class DB extends RoomDatabase {
}
public static class Converters {
@TypeConverter
public static long[] toLongArray(String value) {
if (TextUtils.isEmpty(value))
return new long[0];
else {
String[] received = TextUtils.split(value, ",");
long[] result = new long[received.length];
for (int i = 0; i < result.length; i++)
try {
result[i] = Long.parseLong(received[i]);
} catch (NumberFormatException ex) {
Log.e(ex);
}
return result;
}
}
@TypeConverter
public static String[] toStringArray(String value) {
if (value == null)