Skip to content

Commit

Permalink
todo:
Browse files Browse the repository at this point in the history
  • Loading branch information
panpf committed Jun 27, 2024
1 parent 1c44a8d commit ada70ec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/wiki/save_cellular_traffic.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
Translations: [简体中文](save_cellular_traffic_zh.md)

> [!IMPORTANT]
> Required import `sketch-extensions-core` module
> 1. Required import `sketch-extensions-core` module
> 2. Temporarily unavailable for non-Android platforms
The cellular traffic saving function can set the depth parameter of [ImageRequest] to [Depth].LOCAL
when detecting that current cellular traffic is present, so that images will no longer be downloaded
Expand Down
3 changes: 2 additions & 1 deletion docs/wiki/save_cellular_traffic_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
翻译:[English](save_cellular_traffic.md)

> [!IMPORTANT]
> 必须导入 `sketch-extensions-core` 模块
> 1. 必须导入 `sketch-extensions-core` 模块
> 2. 非安卓平台暂时不可用
节省蜂窝流量功能可以在检测到当前是蜂窝流量时将 [ImageRequest] 的 depth 参数设置为 [Depth].LOCAL,这样就不会再从网络下载图片

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ internal actual fun SystemCallbacks(sketch: Sketch): SystemCallbacks = NoopSyste

private class NoopSystemCallbacks : SystemCallbacks {

// TODO Implement network type detection for non-Android platforms
override val isCellularNetworkConnected get() = false

private val _isShutdown = atomic(false)
Expand Down

0 comments on commit ada70ec

Please sign in to comment.