File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
app/src/main/kotlin/com/d4rk/cleaner/app/apps/manager/ui Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ import kotlinx.coroutines.flow.launchIn
3939import kotlinx.coroutines.flow.onEach
4040import kotlinx.coroutines.flow.update
4141import kotlinx.coroutines.launch
42+ import java.io.File
4243import java.util.Locale
4344
4445class AppManagerViewModel (
@@ -287,7 +288,11 @@ class AppManagerViewModel(
287288 launch(dispatchers.io) {
288289 when (item) {
289290 is AppManagerItem .ApkFile -> {
290- shareApkUseCase(item.path).collectLatest { result ->
291+ val pkgName =
292+ applicationContext.packageManager
293+ .getPackageArchiveInfo(item.path, 0 )?.packageName
294+ ? : File (item.path).nameWithoutExtension
295+ shareApkUseCase(item.path, pkgName).collectLatest { result ->
291296 when (result) {
292297 is DataState .Success -> sendAction(
293298 AppManagerAction .LaunchShareIntent (
You can’t perform that action at this time.
0 commit comments