-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e72e783
commit f732194
Showing
20 changed files
with
230 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
apps/wallet/instance/app/src/main/java/com/tonapps/tonkeeper/koin/workerModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
package com.tonapps.tonkeeper.koin | ||
|
||
import com.tonapps.tonkeeper.worker.DAppPushToggleWorker | ||
import com.tonapps.tonkeeper.worker.PushToggleWorker | ||
import org.koin.androidx.workmanager.dsl.workerOf | ||
import org.koin.dsl.module | ||
|
||
val workerModule = module { | ||
workerOf(::DAppPushToggleWorker) | ||
workerOf(::PushToggleWorker) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...t/instance/app/src/main/java/com/tonapps/tonkeeper/ui/component/MainSwipeRefreshLayout.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.tonapps.tonkeeper.ui.component | ||
|
||
import android.content.Context | ||
import android.util.AttributeSet | ||
import androidx.core.view.doOnLayout | ||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout | ||
import com.tonapps.uikit.color.accentBlueColor | ||
import uikit.extensions.dp | ||
import uikit.extensions.findViewByClass | ||
|
||
class MainSwipeRefreshLayout @JvmOverloads constructor( | ||
context: Context, | ||
attrs: AttributeSet? = null | ||
) : SwipeRefreshLayout(context, attrs) { | ||
|
||
private val recyclerView: MainRecyclerView? by lazy { findViewByClass() } | ||
|
||
private val topPadding: Int | ||
get() = recyclerView?.topPadding ?: 0 | ||
|
||
init { | ||
setColorSchemeColors(context.accentBlueColor) | ||
} | ||
|
||
override fun setRefreshing(refreshing: Boolean) { | ||
if (refreshing) { | ||
doOnLayout { postOnAnimation { super.setRefreshing(true) } } | ||
} else { | ||
super.setRefreshing(false) | ||
} | ||
} | ||
|
||
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) { | ||
super.onSizeChanged(w, h, oldw, oldh) | ||
setProgressViewOffset(true, topPadding, topPadding + 42.dp) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.