Skip to content

Commit

Permalink
Prepare 4.5.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
noties committed Aug 5, 2020
1 parent e4bfe9f commit 2adfeeb
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

# SNAPSHOT
# 4.5.0

#### Added
* `core` - `MovementMethodPlugin.none()`, `MovementMethodPlugin.link()` factory methods
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android.enableJetifier=true
android.enableBuildCache=true
android.buildCacheDir=build/pre-dex-cache

VERSION_NAME=4.5.0-SNAPSHOT
VERSION_NAME=4.5.0

GROUP=io.noties.markwon
POM_DESCRIPTION=Markwon markdown for Android
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public List<Node> reduce(@NonNull Node root) {
Node temp;

while (node != null) {
// @since $SNAPSHOT; do not include LinkReferenceDefinition node (would result
// @since 4.5.0 do not include LinkReferenceDefinition node (would result
// in empty textView if rendered in recycler-view)
if (!(node instanceof LinkReferenceDefinition)) {
list.add(node);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ public static Set<Class<? extends Block>> enabledBlockTypes() {
// @since 4.0.0
private final List<OnTextAddedListener> onTextAddedListeners = new ArrayList<>(0);

// @since $SNAPSHOT;
// @since 4.5.0
private boolean hasExplicitMovementMethod;

protected CorePlugin() {
}

/**
* @since $SNAPSHOT;
* @since 4.5.0
*/
@SuppressWarnings("UnusedReturnValue")
@NonNull
Expand Down Expand Up @@ -201,7 +201,7 @@ public void afterSetText(@NonNull TextView textView) {
// let's ensure that there is a movement method applied
// we do it `afterSetText` so any user-defined movement method won't be
// replaced (it should be done in `beforeSetText` or manually on a TextView)
// @since $SNAPSHOT; we additionally check if we should apply _implicit_ movement method
// @since 4.5.0 we additionally check if we should apply _implicit_ movement method
if (!hasExplicitMovementMethod && textView.getMovementMethod() == null) {
textView.setMovementMethod(LinkMovementMethod.getInstance());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public static Builder builderWithDefaults(@NonNull Context context) {
protected final int linkColor;

// specifies whether we underline links, by default is true
// @since $SNAPSHOT;
// @since 4.5.0
protected final boolean isLinkedUnderlined;

// used in quote, lists
Expand Down Expand Up @@ -462,7 +462,7 @@ public void applyThematicBreakStyle(@NonNull Paint paint) {
public static class Builder {

private int linkColor;
private boolean isLinkUnderlined = true; // @since $SNAPSHOT;
private boolean isLinkUnderlined = true; // @since 4.5.0
private int blockMargin;
private int blockQuoteWidth;
private int blockQuoteColor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class AsyncDrawable extends Drawable {
private final ImageSize imageSize;
private final ImageSizeResolver imageSizeResolver;

// @since $SNAPSHOT;
// @since 4.5.0
private final Drawable placeholder;

private Drawable result;
Expand All @@ -30,7 +30,7 @@ public class AsyncDrawable extends Drawable {
// @since 2.0.1 for use-cases when image is loaded faster than span is drawn and knows canvas width
private boolean waitingForDimensions;

// @since $SNAPSHOT; in case if result is Animatable and this drawable was detached, we
// @since 4.5.0 in case if result is Animatable and this drawable was detached, we
// keep the state to resume when we are going to be attached again (when used in RecyclerView)
private boolean wasPlayingBefore = false;

Expand Down Expand Up @@ -136,13 +136,13 @@ public void setCallback2(@Nullable Callback cb) {
result.setCallback(callback);
}

// @since $SNAPSHOT; we trigger loading only if we have no result (and result is not placeholder)
// @since 4.5.0 we trigger loading only if we have no result (and result is not placeholder)
final boolean shouldLoad = result == null || result == placeholder;

if (result != null) {
result.setCallback(callback);

// @since $SNAPSHOT;
// @since 4.5.0
if (result instanceof Animatable && wasPlayingBefore) {
((Animatable) result).start();
}
Expand Down Expand Up @@ -229,7 +229,7 @@ protected void setPlaceholderResult(@NonNull Drawable placeholder) {

public void setResult(@NonNull Drawable result) {

// @since $SNAPSHOT; revert this flag when we have new source
// @since 4.5.0 revert this flag when we have new source
wasPlayingBefore = false;

// if we have previous one, detach it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class MovementMethodPlugin extends AbstractMarkwonPlugin {
*
* @see #create(MovementMethod)
* @see #link()
* @deprecated $SNAPSHOT; use {@link #link()}
* @deprecated 4.5.0 use {@link #link()}
*/
@NonNull
@Deprecated
Expand All @@ -31,7 +31,7 @@ public static MovementMethodPlugin create() {
}

/**
* @since $SNAPSHOT;
* @since 4.5.0
*/
@NonNull
public static MovementMethodPlugin link() {
Expand All @@ -42,7 +42,7 @@ public static MovementMethodPlugin link() {
* Special {@link MovementMethodPlugin} that is <strong>not</strong> applying a MovementMethod on a TextView
* implicitly
*
* @since $SNAPSHOT;
* @since 4.5.0
*/
@NonNull
public static MovementMethodPlugin none() {
Expand All @@ -58,7 +58,7 @@ public static MovementMethodPlugin create(@NonNull MovementMethod movementMethod
private final MovementMethod movementMethod;

/**
* Since $SNAPSHOT; change to be <em>nullable</em>
* Since 4.5.0 change to be <em>nullable</em>
*/
@SuppressWarnings("WeakerAccess")
MovementMethodPlugin(@Nullable MovementMethod movementMethod) {
Expand All @@ -73,7 +73,7 @@ public void configure(@NonNull Registry registry) {

@Override
public void beforeSetText(@NonNull TextView textView, @NonNull Spanned markdown) {
// @since $SNAPSHOT; check for equality
// @since 4.5.0 check for equality
final MovementMethod current = textView.getMovementMethod();
if (current != movementMethod) {
textView.setMovementMethod(movementMethod);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static Padding symmetric(int vertical, int horizontal) {
}

/**
* @since $SNAPSHOT;
* @since 4.5.0
*/
@NonNull
public static Padding of(int left, int top, int right, int bottom) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public abstract Object getSpans(

@Override
public void handle(@NonNull MarkwonVisitor visitor, @NonNull MarkwonHtmlRenderer renderer, @NonNull HtmlTag tag) {
// @since $SNAPSHOT; check if tag is block one and visit children
// @since 4.5.0 check if tag is block one and visit children
if (tag.isBlock()) {
visitChildren(visitor, renderer, tag.getAsBlock());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public interface GlideStore {

@NonNull
public static GlideImagesPlugin create(@NonNull final Context context) {
// @since $SNAPSHOT; cache RequestManager
// @since 4.5.0 cache RequestManager
// sometimes `cancel` would be called after activity is destroyed,
// so `Glide.with(context)` will throw an exception
return create(Glide.with(context));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected Node parse() {

return node;
} else {
// @since $SNAPSHOT; return null in case no match (multiple inline
// @since 4.5.0 return null in case no match (multiple inline
// processors can define `!` as _special_ character, so let them handle it)
// NB! do not forget to reset index
index = startIndex;
Expand Down

0 comments on commit 2adfeeb

Please sign in to comment.