Prepare 4.1.0 release
This commit is contained in:
		
							parent
							
								
									b6fa66914f
								
							
						
					
					
						commit
						a2d35a1553
					
				| @ -1,6 +1,6 @@ | ||||
| # Changelog | ||||
| 
 | ||||
| # 4.1.0-SNAPSHOT | ||||
| # 4.1.0 | ||||
| * Add `Markwon.TextSetter` interface to be able to use PrecomputedText/PrecomputedTextCompat | ||||
| * Add `PrecomputedTextSetterCompat` and `compileOnly` dependency on `androidx.core:core`  | ||||
| (clients must have this dependency in the classpath) | ||||
|  | ||||
| @ -8,7 +8,7 @@ android.enableJetifier=true | ||||
| android.enableBuildCache=true | ||||
| android.buildCacheDir=build/pre-dex-cache | ||||
| 
 | ||||
| VERSION_NAME=4.1.0-SNAPSHOT | ||||
| VERSION_NAME=4.1.0 | ||||
| 
 | ||||
| GROUP=io.noties.markwon | ||||
| POM_DESCRIPTION=Markwon markdown for Android | ||||
|  | ||||
| @ -19,7 +19,7 @@ dependencies { | ||||
|         api it['x-annotations'] | ||||
|         api it['commonmark'] | ||||
| 
 | ||||
|         // @since 4.1.0-SNAPSHOT to allow PrecomputedTextSetterCompat | ||||
|         // @since 4.1.0 to allow PrecomputedTextSetterCompat | ||||
|         // note that this dependency must be added on a client side explicitly | ||||
|         compileOnly it['x-core'] | ||||
|     } | ||||
|  | ||||
| @ -122,14 +122,14 @@ public abstract class Markwon { | ||||
|     public abstract <P extends MarkwonPlugin> P getPlugin(@NonNull Class<P> type); | ||||
| 
 | ||||
|     /** | ||||
|      * @since 4.1.0-SNAPSHOT | ||||
|      * @since 4.1.0 | ||||
|      */ | ||||
|     @NonNull | ||||
|     public abstract <P extends MarkwonPlugin> P requirePlugin(@NonNull Class<P> type); | ||||
| 
 | ||||
|     /** | ||||
|      * @return a list of registered {@link MarkwonPlugin} | ||||
|      * @since 4.1.0-SNAPSHOT | ||||
|      * @since 4.1.0 | ||||
|      */ | ||||
|     @NonNull | ||||
|     public abstract List<? extends MarkwonPlugin> getPlugins(); | ||||
| @ -139,7 +139,7 @@ public abstract class Markwon { | ||||
|      * functionality | ||||
|      * | ||||
|      * @see PrecomputedTextSetterCompat | ||||
|      * @since 4.1.0-SNAPSHOT | ||||
|      * @since 4.1.0 | ||||
|      */ | ||||
|     public interface TextSetter { | ||||
|         /** | ||||
| @ -178,7 +178,7 @@ public abstract class Markwon { | ||||
| 
 | ||||
|         /** | ||||
|          * @param textSetter {@link TextSetter} to apply text to a TextView | ||||
|          * @since 4.1.0-SNAPSHOT | ||||
|          * @since 4.1.0 | ||||
|          */ | ||||
|         @NonNull | ||||
|         Builder textSetter(@NonNull TextSetter textSetter); | ||||
|  | ||||
| @ -23,7 +23,7 @@ class MarkwonImpl extends Markwon { | ||||
|     private final MarkwonVisitor visitor; | ||||
|     private final List<MarkwonPlugin> plugins; | ||||
| 
 | ||||
|     // @since 4.1.0-SNAPSHOT | ||||
|     // @since 4.1.0 | ||||
|     @Nullable | ||||
|     private final TextSetter textSetter; | ||||
| 
 | ||||
| @ -92,7 +92,7 @@ class MarkwonImpl extends Markwon { | ||||
|             plugin.beforeSetText(textView, markdown); | ||||
|         } | ||||
| 
 | ||||
|         // @since 4.1.0-SNAPSHOT | ||||
|         // @since 4.1.0 | ||||
|         if (textSetter != null) { | ||||
|             textSetter.setText(textView, markdown, bufferType, new Runnable() { | ||||
|                 @Override | ||||
|  | ||||
| @ -17,7 +17,7 @@ import java.util.concurrent.Executor; | ||||
|  * Please do not use with `markwon-recycler` as it will lead to bad item rendering (due to async nature) | ||||
|  * | ||||
|  * @see io.noties.markwon.Markwon.TextSetter | ||||
|  * @since 4.1.0-SNAPSHOT | ||||
|  * @since 4.1.0 | ||||
|  */ | ||||
| public class PrecomputedTextSetterCompat implements Markwon.TextSetter { | ||||
| 
 | ||||
|  | ||||
| @ -57,7 +57,7 @@ public abstract class AsyncDrawableScheduler { | ||||
|                 textView.setTag(R.id.markwon_drawables_scheduler, listener); | ||||
|             } | ||||
| 
 | ||||
|             // @since 4.1.0-SNAPSHOT | ||||
|             // @since 4.1.0 | ||||
|             final DrawableCallbackImpl.Invalidator invalidator = new TextViewInvalidator(textView); | ||||
| 
 | ||||
|             AsyncDrawable drawable; | ||||
| @ -112,14 +112,14 @@ public abstract class AsyncDrawableScheduler { | ||||
| 
 | ||||
|     private static class DrawableCallbackImpl implements Drawable.Callback { | ||||
| 
 | ||||
|         // @since 4.1.0-SNAPSHOT | ||||
|         // @since 4.1.0 | ||||
|         // interface to be used when bounds change and view must be invalidated | ||||
|         interface Invalidator { | ||||
|             void invalidate(); | ||||
|         } | ||||
| 
 | ||||
|         private final TextView view; | ||||
|         private final Invalidator invalidator; // @since 4.1.0-SNAPSHOT | ||||
|         private final Invalidator invalidator; // @since 4.1.0 | ||||
| 
 | ||||
|         private Rect previousBounds; | ||||
| 
 | ||||
| @ -151,7 +151,7 @@ public abstract class AsyncDrawableScheduler { | ||||
|             // but if the size has changed, then we need to update the whole layout... | ||||
| 
 | ||||
|             if (!previousBounds.equals(rect)) { | ||||
|                 // @since 4.1.0-SNAPSHOT | ||||
|                 // @since 4.1.0 | ||||
|                 // invalidation moved to upper level (so invalidation can be deferred, | ||||
|                 // and multiple calls combined) | ||||
|                 invalidator.invalidate(); | ||||
|  | ||||
| @ -35,7 +35,7 @@ abstract class TableRowsScheduler { | ||||
| 
 | ||||
|             final TableRowSpan.Invalidator invalidator = new TableRowSpan.Invalidator() { | ||||
| 
 | ||||
|                 // @since 4.1.0-SNAPSHOT | ||||
|                 // @since 4.1.0 | ||||
|                 // let's stack-up invalidation calls (so invalidation happens, | ||||
|                 // but not with each table-row-span draw call) | ||||
|                 final Runnable runnable = new Runnable() { | ||||
| @ -47,7 +47,7 @@ abstract class TableRowsScheduler { | ||||
| 
 | ||||
|                 @Override | ||||
|                 public void invalidate() { | ||||
|                     // @since 4.1.0-SNAPSHOT post invalidation (combine multiple calls) | ||||
|                     // @since 4.1.0 post invalidation (combine multiple calls) | ||||
|                     view.removeCallbacks(runnable); | ||||
|                     view.post(runnable); | ||||
|                 } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Dimitry Ivanov
						Dimitry Ivanov