diff --git a/core/src/main/java/bisq/core/notifications/MobileModel.java b/core/src/main/java/bisq/core/notifications/MobileModel.java index ceacf4feeab..90532fb6663 100644 --- a/core/src/main/java/bisq/core/notifications/MobileModel.java +++ b/core/src/main/java/bisq/core/notifications/MobileModel.java @@ -131,7 +131,7 @@ boolean parseDescriptor(String descriptor) { iPad Pro 12.9 Inch 2. Generation iPad Pro 10.5 Inch */ - // iPhone 6 does not support isContentAvailable, iPhone 7 does. + // iPhone 6 does not support isContentAvailable, iPhone 6s and 7 does. // We don't know for other versions, but lets assume all above iPhone 6 are ok. if (descriptor != null) { String[] descriptorTokens = descriptor.split(" "); @@ -143,14 +143,17 @@ boolean parseDescriptor(String descriptor) { if (Arrays.asList(validVersions).contains(versionString)) { return true; } + String versionSuffix = ""; if (versionString.matches("\\d[^\\d]")) { + versionSuffix = versionString.substring(1); versionString = versionString.substring(0, 1); } else if (versionString.matches("\\d{2}[^\\d]")) { + versionSuffix = versionString.substring(2); versionString = versionString.substring(0, 2); } try { int version = Integer.parseInt(versionString); - return version > 5; + return version > 6 || (version == 6 && versionSuffix.equalsIgnoreCase("s")); } catch (Throwable ignore) { } } else { diff --git a/core/src/test/java/bisq/core/notifications/MobileModelTest.java b/core/src/test/java/bisq/core/notifications/MobileModelTest.java index a7540f4bd2c..4790d54c3a7 100644 --- a/core/src/test/java/bisq/core/notifications/MobileModelTest.java +++ b/core/src/test/java/bisq/core/notifications/MobileModelTest.java @@ -43,8 +43,8 @@ public void testParseDescriptor() { new Tuple2<>("iPhone 5c", false), new Tuple2<>("iPhone 5s", false), - new Tuple2<>("iPhone 6", true), - new Tuple2<>("iPhone 6 Plus", true), + new Tuple2<>("iPhone 6", false), + new Tuple2<>("iPhone 6 Plus", false), new Tuple2<>("iPhone 6s", true), new Tuple2<>("iPhone 6s Plus", true),