Skip to content

Commit 0b9c514

Browse files
committed
🤖: update
1 parent 9051d87 commit 0b9c514

File tree

15 files changed

+76
-72
lines changed

15 files changed

+76
-72
lines changed

README.md

Lines changed: 32 additions & 30 deletions
Large diffs are not rendered by default.

README.zh-CN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
| [useEffect](https://github.com/junerver/ComposeHooks/blob/master/app/src/main/java/xyz/junerver/composehooks/example/UseEffectExample.kt) | just like react |
3838
| [useEvent](https://github.com/junerver/ComposeHooks/blob/master/app/src/main/java/xyz/junerver/composehooks/example/UseEventExample.kt) | 使用订阅发布模式实现轻量级的跨组件通信 |
3939
| [useInterval](https://github.com/junerver/ComposeHooks/blob/master/app/src/main/java/xyz/junerver/composehooks/example/UseIntervalExample.kt) | 一个可以处理 setInterval 的 Hook。 |
40+
| useKeyboard | 一个控制软键盘显示隐藏的 Hook。 |
4041
| [useLatest](https://github.com/junerver/ComposeHooks/blob/master/app/src/main/java/xyz/junerver/composehooks/example/UseLatestExample.kt) | 返回当前最新值的 Hook,可以避免在使用解构写法时的闭包问题。 |
4142
| [useMount](https://github.com/junerver/ComposeHooks/blob/master/app/src/main/java/xyz/junerver/composehooks/example/UseMountExample.kt) | 只在组件初始化时执行的 Hook。 |
4243
| [useNow](https://github.com/junerver/ComposeHooks/blob/master/app/src/main/java/xyz/junerver/composehooks/example/UseNowExample.kt) | 动态返回当前时间,默认:yyyy-MM-dd HH:mm:ss |
@@ -56,6 +57,7 @@
5657
| [useUnmount](https://github.com/junerver/ComposeHooks/blob/master/app/src/main/java/xyz/junerver/composehooks/example/UseMountExample.kt) | 在组件卸载(unmount)时执行的 Hook。 |
5758
| [useUpdate](https://github.com/junerver/ComposeHooks/blob/master/app/src/main/java/xyz/junerver/composehooks/example/UseUpdateExample.kt) | useUpdate 会返回一个函数,调用该函数会强制组件重新渲染。 |
5859
| [useUpdateEffect](https://github.com/junerver/ComposeHooks/blob/master/app/src/main/java/xyz/junerver/composehooks/example/UseUpdateEffectExample.kt) | useUpdateEffect 用法等同于 useEffect,但是会忽略首次执行,只在依赖更新时执行。 |
60+
| [useVibrate](https://github.com/junerver/ComposeHooks/blob/master/app/src/main/java/xyz/junerver/composehooks/example/UseVibrateExample.kt) | 用于使用震动反馈的 Hook |
5961

6062

6163
## 添加依赖

app/src/main/java/xyz/junerver/composehooks/example/UseVibrateExample.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package xyz.junerver.composehooks.example
33
import androidx.compose.foundation.layout.Column
44
import androidx.compose.material3.Surface
55
import androidx.compose.runtime.Composable
6-
import xyz.junerver.compose.hooks.usevibration.useVibrate
6+
import xyz.junerver.compose.hooks.usevibrate.useVibrate
77
import xyz.junerver.composehooks.ui.component.TButton
88

99
/**

docs/api/hooks/package-list

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,10 @@ $dokka.location:xyz.junerver.compose.hooks.userequest/RequestOptions/setCache/#/
196196
$dokka.location:xyz.junerver.compose.hooks.userequest/RequestOptions/staleTime/#/PointingToDeclaration/hooks/xyz.junerver.compose.hooks.userequest/-request-options/stale-time.html
197197
$dokka.location:xyz.junerver.compose.hooks.userequest/RequestOptions/throttleOptions/#/PointingToDeclaration/hooks/xyz.junerver.compose.hooks.userequest/-request-options/throttle-options.html
198198
$dokka.location:xyz.junerver.compose.hooks.userequest/RunFn///PointingToDeclaration/hooks/xyz.junerver.compose.hooks.userequest/-run-fn/index.html
199-
$dokka.location:xyz.junerver.compose.hooks.usevibration////PointingToDeclaration/hooks/xyz.junerver.compose.hooks.usevibration/index.html
200-
$dokka.location:xyz.junerver.compose.hooks.usevibration//useVibrate/#/PointingToDeclaration/hooks/xyz.junerver.compose.hooks.usevibration/use-vibrate.html
201-
$dokka.location:xyz.junerver.compose.hooks.usevibration//vibrateLong/android.content.Context#/PointingToDeclaration/hooks/xyz.junerver.compose.hooks.usevibration/vibrate-long.html
202-
$dokka.location:xyz.junerver.compose.hooks.usevibration//vibrateShort/android.content.Context#/PointingToDeclaration/hooks/xyz.junerver.compose.hooks.usevibration/vibrate-short.html
199+
$dokka.location:xyz.junerver.compose.hooks.usevibrate////PointingToDeclaration/hooks/xyz.junerver.compose.hooks.usevibrate/index.html
200+
$dokka.location:xyz.junerver.compose.hooks.usevibrate//useVibrate/#/PointingToDeclaration/hooks/xyz.junerver.compose.hooks.usevibrate/use-vibrate.html
201+
$dokka.location:xyz.junerver.compose.hooks.usevibrate//vibrateLong/android.content.Context#/PointingToDeclaration/hooks/xyz.junerver.compose.hooks.usevibrate/vibrate-long.html
202+
$dokka.location:xyz.junerver.compose.hooks.usevibrate//vibrateShort/android.content.Context#/PointingToDeclaration/hooks/xyz.junerver.compose.hooks.usevibrate/vibrate-short.html
203203
$dokka.location:xyz.junerver.compose.hooks////PointingToDeclaration/hooks/xyz.junerver.compose.hooks/index.html
204204
$dokka.location:xyz.junerver.compose.hooks//LaunchedDebounceEffect/#kotlin.Array[kotlin.Any?]#xyz.junerver.compose.hooks.DebounceOptions#kotlin.coroutines.SuspendFunction1[kotlinx.coroutines.CoroutineScope,kotlin.Unit]/PointingToDeclaration/hooks/xyz.junerver.compose.hooks/-launched-debounce-effect.html
205205
$dokka.location:xyz.junerver.compose.hooks//LaunchedThrottleEffect/#kotlin.Array[kotlin.Any?]#xyz.junerver.compose.hooks.ThrottleOptions#kotlin.coroutines.SuspendFunction1[kotlinx.coroutines.CoroutineScope,kotlin.Unit]/PointingToDeclaration/hooks/xyz.junerver.compose.hooks/-launched-throttle-effect.html
@@ -289,7 +289,7 @@ $dokka.location:xyz.junerver.compose.hooks//useList/#kotlin.collections.Collecti
289289
$dokka.location:xyz.junerver.compose.hooks//useLong/#kotlin.Long/PointingToDeclaration/hooks/xyz.junerver.compose.hooks/use-long.html
290290
$dokka.location:xyz.junerver.compose.hooks//useMap/#kotlin.Array[kotlin.Pair[TypeParam(bounds=[kotlin.Any?]),TypeParam(bounds=[kotlin.Any?])]]/PointingToDeclaration/hooks/xyz.junerver.compose.hooks/use-map.html
291291
$dokka.location:xyz.junerver.compose.hooks//useMap/#kotlin.collections.Iterable[kotlin.Pair[TypeParam(bounds=[kotlin.Any?]),TypeParam(bounds=[kotlin.Any?])]]/PointingToDeclaration/hooks/xyz.junerver.compose.hooks/use-map.html
292-
$dokka.location:xyz.junerver.compose.hooks//useMount/#kotlin.Function0[kotlin.Unit]/PointingToDeclaration/hooks/xyz.junerver.compose.hooks/use-mount.html
292+
$dokka.location:xyz.junerver.compose.hooks//useMount/#kotlin.coroutines.SuspendFunction1[kotlinx.coroutines.CoroutineScope,kotlin.Unit]/PointingToDeclaration/hooks/xyz.junerver.compose.hooks/use-mount.html
293293
$dokka.location:xyz.junerver.compose.hooks//useNow/#xyz.junerver.compose.hooks.UseNowOptions/PointingToDeclaration/hooks/xyz.junerver.compose.hooks/use-now.html
294294
$dokka.location:xyz.junerver.compose.hooks//usePersistent/#kotlin.String#TypeParam(bounds=[kotlin.Any?])/PointingToDeclaration/hooks/xyz.junerver.compose.hooks/use-persistent.html
295295
$dokka.location:xyz.junerver.compose.hooks//usePrevious/#TypeParam(bounds=[kotlin.Any?])/PointingToDeclaration/hooks/xyz.junerver.compose.hooks/use-previous.html
@@ -370,5 +370,5 @@ xyz.junerver.compose.hooks.usenetwork
370370
xyz.junerver.compose.hooks.useredux
371371
xyz.junerver.compose.hooks.userequest
372372
xyz.junerver.compose.hooks.userequest.utils
373-
xyz.junerver.compose.hooks.usevibration
373+
xyz.junerver.compose.hooks.usevibrate
374374

docs/api/hooks/xyz.junerver.compose.hooks.usevibration/index.html renamed to docs/api/hooks/xyz.junerver.compose.hooks.usevibrate/index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html class="no-js">
33
<head>
44
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
5-
<title>xyz.junerver.compose.hooks.usevibration</title>
5+
<title>xyz.junerver.compose.hooks.usevibrate</title>
66
<link href="../../images/logo-icon.svg" rel="icon" type="image/svg">
77
<script>var pathToRoot = "../../";</script>
88
<script>document.documentElement.classList.replace("no-js","js");</script>
@@ -61,8 +61,8 @@
6161
<div class="sidebar--inner" id="sideMenu"></div>
6262
</div>
6363
<div id="main">
64-
<div class="main-content" data-page-type="package" id="content" pageIds="hooks::xyz.junerver.compose.hooks.usevibration////PointingToDeclaration//1917587792">
65-
<div class="breadcrumbs"><a href="../../index.html">hooks</a><span class="delimiter">/</span><span class="current">xyz.junerver.compose.hooks.usevibration</span></div>
64+
<div class="main-content" data-page-type="package" id="content" pageIds="hooks::xyz.junerver.compose.hooks.usevibrate////PointingToDeclaration//1917587792">
65+
<div class="breadcrumbs"><a href="../../index.html">hooks</a><span class="delimiter">/</span><span class="current">xyz.junerver.compose.hooks.usevibrate</span></div>
6666
<div class="cover ">
6767
<h1 class="cover"><span><span>Package-level</span></span> <span><span>declarations</span></span></h1>
6868
</div>
@@ -71,12 +71,12 @@ <h1 class="cover"><span><span>Package-level</span></span> <span><span>declaratio
7171
<div class="tabs-section-body">
7272
<div data-togglable="FUNCTION">
7373
<h2 class="">Functions</h2>
74-
<div class="table"><a data-name="216098762%2FFunctions%2F1917587792" anchor-label="useVibrate" id="216098762%2FFunctions%2F1917587792" data-filterable-set=":hooks:dokkaHtml/release"></a>
74+
<div class="table"><a data-name="2027993293%2FFunctions%2F1917587792" anchor-label="useVibrate" id="2027993293%2FFunctions%2F1917587792" data-filterable-set=":hooks:dokkaHtml/release"></a>
7575
<div class="table-row" data-filterable-current=":hooks:dokkaHtml/release" data-filterable-set=":hooks:dokkaHtml/release">
7676
<div class="main-subrow keyValue ">
7777
<div class=""><span class="inline-flex">
7878
<div><a href="use-vibrate.html"><span>use</span><wbr></wbr><span><span>Vibrate</span></span></a></div>
79-
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="216098762%2FFunctions%2F1917587792"></span>
79+
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="2027993293%2FFunctions%2F1917587792"></span>
8080
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
8181
</span></span></div>
8282
<div>
@@ -86,12 +86,12 @@ <h2 class="">Functions</h2>
8686
</div>
8787
</div>
8888
</div>
89-
<a data-name="2048657306%2FFunctions%2F1917587792" anchor-label="vibrateLong" id="2048657306%2FFunctions%2F1917587792" data-filterable-set=":hooks:dokkaHtml/release"></a>
89+
<a data-name="1846099869%2FFunctions%2F1917587792" anchor-label="vibrateLong" id="1846099869%2FFunctions%2F1917587792" data-filterable-set=":hooks:dokkaHtml/release"></a>
9090
<div class="table-row" data-togglable="EXTENSION_FUNCTION" data-filterable-current=":hooks:dokkaHtml/release" data-filterable-set=":hooks:dokkaHtml/release">
9191
<div class="main-subrow keyValue ">
9292
<div class=""><span class="inline-flex">
9393
<div><a href="vibrate-long.html"><span>vibrate</span><wbr></wbr><span><span>Long</span></span></a></div>
94-
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="2048657306%2FFunctions%2F1917587792"></span>
94+
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1846099869%2FFunctions%2F1917587792"></span>
9595
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
9696
</span></span></div>
9797
<div>
@@ -101,12 +101,12 @@ <h2 class="">Functions</h2>
101101
</div>
102102
</div>
103103
</div>
104-
<a data-name="901718546%2FFunctions%2F1917587792" anchor-label="vibrateShort" id="901718546%2FFunctions%2F1917587792" data-filterable-set=":hooks:dokkaHtml/release"></a>
104+
<a data-name="-1082594705%2FFunctions%2F1917587792" anchor-label="vibrateShort" id="-1082594705%2FFunctions%2F1917587792" data-filterable-set=":hooks:dokkaHtml/release"></a>
105105
<div class="table-row" data-togglable="EXTENSION_FUNCTION" data-filterable-current=":hooks:dokkaHtml/release" data-filterable-set=":hooks:dokkaHtml/release">
106106
<div class="main-subrow keyValue ">
107107
<div class=""><span class="inline-flex">
108108
<div><a href="vibrate-short.html"><span>vibrate</span><wbr></wbr><span><span>Short</span></span></a></div>
109-
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="901718546%2FFunctions%2F1917587792"></span>
109+
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1082594705%2FFunctions%2F1917587792"></span>
110110
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
111111
</span></span></div>
112112
<div>

docs/api/hooks/xyz.junerver.compose.hooks.usevibration/use-vibrate.html renamed to docs/api/hooks/xyz.junerver.compose.hooks.usevibrate/use-vibrate.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
<div class="sidebar--inner" id="sideMenu"></div>
6262
</div>
6363
<div id="main">
64-
<div class="main-content" data-page-type="member" id="content" pageIds="hooks::xyz.junerver.compose.hooks.usevibration//useVibrate/#/PointingToDeclaration//1917587792">
65-
<div class="breadcrumbs"><a href="../../index.html">hooks</a><span class="delimiter">/</span><a href="index.html">xyz.junerver.compose.hooks.usevibration</a><span class="delimiter">/</span><span class="current">useVibrate</span></div>
64+
<div class="main-content" data-page-type="member" id="content" pageIds="hooks::xyz.junerver.compose.hooks.usevibrate//useVibrate/#/PointingToDeclaration//1917587792">
65+
<div class="breadcrumbs"><a href="../../index.html">hooks</a><span class="delimiter">/</span><a href="index.html">xyz.junerver.compose.hooks.usevibrate</a><span class="delimiter">/</span><span class="current">useVibrate</span></div>
6666
<div class="cover ">
6767
<h1 class="cover"><span>use</span><wbr></wbr><span><span>Vibrate</span></span></h1>
6868
</div>

docs/api/hooks/xyz.junerver.compose.hooks.usevibration/vibrate-long.html renamed to docs/api/hooks/xyz.junerver.compose.hooks.usevibrate/vibrate-long.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
<div class="sidebar--inner" id="sideMenu"></div>
6262
</div>
6363
<div id="main">
64-
<div class="main-content" data-page-type="member" id="content" pageIds="hooks::xyz.junerver.compose.hooks.usevibration//vibrateLong/android.content.Context#/PointingToDeclaration//1917587792">
65-
<div class="breadcrumbs"><a href="../../index.html">hooks</a><span class="delimiter">/</span><a href="index.html">xyz.junerver.compose.hooks.usevibration</a><span class="delimiter">/</span><span class="current">vibrateLong</span></div>
64+
<div class="main-content" data-page-type="member" id="content" pageIds="hooks::xyz.junerver.compose.hooks.usevibrate//vibrateLong/android.content.Context#/PointingToDeclaration//1917587792">
65+
<div class="breadcrumbs"><a href="../../index.html">hooks</a><span class="delimiter">/</span><a href="index.html">xyz.junerver.compose.hooks.usevibrate</a><span class="delimiter">/</span><span class="current">vibrateLong</span></div>
6666
<div class="cover ">
6767
<h1 class="cover"><span>vibrate</span><wbr></wbr><span><span>Long</span></span></h1>
6868
</div>

docs/api/hooks/xyz.junerver.compose.hooks.usevibration/vibrate-short.html renamed to docs/api/hooks/xyz.junerver.compose.hooks.usevibrate/vibrate-short.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
<div class="sidebar--inner" id="sideMenu"></div>
6262
</div>
6363
<div id="main">
64-
<div class="main-content" data-page-type="member" id="content" pageIds="hooks::xyz.junerver.compose.hooks.usevibration//vibrateShort/android.content.Context#/PointingToDeclaration//1917587792">
65-
<div class="breadcrumbs"><a href="../../index.html">hooks</a><span class="delimiter">/</span><a href="index.html">xyz.junerver.compose.hooks.usevibration</a><span class="delimiter">/</span><span class="current">vibrateShort</span></div>
64+
<div class="main-content" data-page-type="member" id="content" pageIds="hooks::xyz.junerver.compose.hooks.usevibrate//vibrateShort/android.content.Context#/PointingToDeclaration//1917587792">
65+
<div class="breadcrumbs"><a href="../../index.html">hooks</a><span class="delimiter">/</span><a href="index.html">xyz.junerver.compose.hooks.usevibrate</a><span class="delimiter">/</span><span class="current">vibrateShort</span></div>
6666
<div class="cover ">
6767
<h1 class="cover"><span>vibrate</span><wbr></wbr><span><span>Short</span></span></h1>
6868
</div>

docs/api/hooks/xyz.junerver.compose.hooks/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,17 +1474,17 @@ <h2 class="">Functions</h2>
14741474
</div>
14751475
</div>
14761476
</div>
1477-
<a data-name="-903322839%2FFunctions%2F1917587792" anchor-label="useMount" id="-903322839%2FFunctions%2F1917587792" data-filterable-set=":hooks:dokkaHtml/release"></a>
1477+
<a data-name="1324857773%2FFunctions%2F1917587792" anchor-label="useMount" id="1324857773%2FFunctions%2F1917587792" data-filterable-set=":hooks:dokkaHtml/release"></a>
14781478
<div class="table-row" data-filterable-current=":hooks:dokkaHtml/release" data-filterable-set=":hooks:dokkaHtml/release">
14791479
<div class="main-subrow keyValue ">
14801480
<div class=""><span class="inline-flex">
14811481
<div><a href="use-mount.html"><span>use</span><wbr></wbr><span><span>Mount</span></span></a></div>
1482-
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-903322839%2FFunctions%2F1917587792"></span>
1482+
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1324857773%2FFunctions%2F1917587792"></span>
14831483
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
14841484
</span></span></div>
14851485
<div>
14861486
<div class="title">
1487-
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":hooks:dokkaHtml/release"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html"><span class="token annotation builtin">Composable</span></a></div></div><span class="token keyword">fun </span><a href="use-mount.html"><span class="token function">useMount</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">fn<span class="token operator">: </span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></span></span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Description:组件挂载时执行</p></div></div></div>
1487+
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":hooks:dokkaHtml/release"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation builtin">@</span><a href="https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html"><span class="token annotation builtin">Composable</span></a></div></div><span class="token keyword">fun </span><a href="use-mount.html"><span class="token function">useMount</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">fn<span class="token operator">: </span><span data-unresolved-link="xyz.junerver.compose.hooks/SuspendAsyncFn///PointingToDeclaration/">SuspendAsyncFn</span></span></span><span class="token punctuation">)</span></div><div class="brief "><p class="paragraph">Description:组件挂载时执行</p></div></div></div>
14881488
</div>
14891489
</div>
14901490
</div>

0 commit comments

Comments
 (0)