Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Niedermann <info@niedermann.it>2020-06-15 15:39:42 +0300
committerStefan Niedermann <info@niedermann.it>2020-06-15 15:39:42 +0300
commit58122f4cbeabafda2d7b4e38a0fc2878b1127dfb (patch)
tree914e30aaa5acbffb6fbd9af11f778c95f1685be8 /app/src/main/java/it/niedermann/nextcloud/deck/model
parent79ae52a7d5aa9c8935084fee74e2ff0c871108f1 (diff)
Update Reply comment stuff
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/model')
-rw-r--r--app/src/main/java/it/niedermann/nextcloud/deck/model/ocs/Version.java22
1 files changed, 12 insertions, 10 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/model/ocs/Version.java b/app/src/main/java/it/niedermann/nextcloud/deck/model/ocs/Version.java
index 69e4c334e..7ef97a294 100644
--- a/app/src/main/java/it/niedermann/nextcloud/deck/model/ocs/Version.java
+++ b/app/src/main/java/it/niedermann/nextcloud/deck/model/ocs/Version.java
@@ -12,10 +12,12 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import it.niedermann.nextcloud.deck.R;
+import it.niedermann.nextcloud.deck.model.ocs.comment.DeckComment;
public class Version implements Comparable<Version> {
private static final Pattern NUMBER_EXTRACTION_PATTERN = Pattern.compile("[0-9]+");
private static final Version VERSION_1_0_0 = new Version("1.0.0", 1, 0, 0);
+ private static final Version VERSION_1_0_3 = new Version("1.0.3", 1, 0, 3);
@Nullable
private static Version VERSION_MINIMUM_SUPPORTED;
@@ -101,9 +103,9 @@ public class Version implements Comparable<Version> {
/**
* @param compare another version object
- * @return -1 if the compared version is <strong>higher</strong> than the current version
- * 0 if the compared version is equal to the current version
- * 1 if the compared version is <strong>lower</strong> than the current version
+ * @return -1 if the compared {@link Version} is <strong>higher</strong> than the current version
+ * 0 if the compared {@link Version} is equal to the current version
+ * 1 if the compared {@link Version} is <strong>lower</strong> than the current version
*/
@Override
public int compareTo(@NonNull Version compare) {
@@ -135,27 +137,27 @@ public class Version implements Comparable<Version> {
}
/**
- * Comments API only available starting with version 1.0.0-alpha1
+ * {@link DeckComment} API only available starting with {@link Version} 1.0.0-alpha1
*
- * @return whether or not the server supports the Comments API
+ * @return whether or not the server supports the {@link DeckComment} API
*/
public boolean supportsComments() {
return isGreaterOrEqualTo(VERSION_1_0_0);
}
/**
- * Replying to comments does cause synchronization errors because the API expected the
- * <code>parentId</code> to be a {@link String} up until version x.x.x
+ * Replying to a {@link DeckComment} does cause synchronization errors because the API expected the
+ * <code>parentId</code> to be a {@link String} up until {@link Version} 1.0.3
* https://github.com/nextcloud/deck/issues/1831#issuecomment-627207849
*
* @return whether or not the server supports replying to comments
*/
public boolean supportsCommentsReplys() {
- return false;
+ return isGreaterOrEqualTo(VERSION_1_0_3);
}
/**
- * Title max length has been increased from 100 to 255 characters beginning with server version 1.0.0
+ * Title max length has been increased from 100 to 255 characters beginning with server {@link Version} 1.0.0
*
* @return the number of characters that the title fields of cards allow
* @see <a href="https://github.com/stefan-niedermann/nextcloud-deck/issues/422">issue</a>
@@ -166,7 +168,7 @@ public class Version implements Comparable<Version> {
: 100;
}
/**
- * URL to view a card in the web interface has been changed in version 1.0.0
+ * URL to view a card in the web interface has been changed in {@link Version} 1.0.0
*
* @return the id of the string resource which contains the partial URL to open a card in the web UI
* @see <a href="https://github.com/nextcloud/deck/pull/1977">documentation in PR</a>