Recomposition does not occur in jetpack compose while the value updated

When the currentManzil is updated from the ActionBar the filename is also updated but PdfView composable is not recall which uses the filename. Because here in my code the currentManzil is updated from the ActionBar and when the currentManzil updated it automatically updated the filename but when the filename updated i want to recall the PdfView composable or i want recomposition which updated my UI according to new data.
Here is my code below :

@Composable
fun ShowPdfScreen(manzil: Int, navController: NavController) {
    var currentPage by remember { mutableIntStateOf(0) }
    var totalPages by remember { mutableIntStateOf(0) }
    var isFullScreen by remember { mutableStateOf(false) }
    var currentManzil by remember { mutableIntStateOf(manzil) }
    var fileName by remember { mutableStateOf("") }

    // Hide the status bar
    val systemUiController = rememberSystemUiController()
    systemUiController.isStatusBarVisible = !isFullScreen

    fileName = getFileName(currentManzil)
    Log.d("Check Pdf", "filename is -> $fileName")

    Scaffold(
        topBar = {
            if (!isFullScreen) {
                ActionBar(title = currentManzil, true, navController) {
                    currentManzil = it
                }
            }
        },
        content = { paddingValues ->
            Box(modifier = Modifier.padding(paddingValues)) {
                Log.d("Check Pdf", "filename before pdfview -> $fileName")
                PdfView(fileName = fileName, onPageChanged = { page, pageCount ->
                    currentPage = page
                    totalPages = pageCount
                })
                Log.d("Check Pdf", "PdfView called!")
            }
        },
        floatingActionButton = {
            SmallFloatingActionButton(
                onClick = { isFullScreen = !isFullScreen },
                containerColor = AppGreenColor,
                contentColor = Color.White,
                modifier = Modifier.size(50.dp)
            ) {
                Icon(

                    painter = if (!isFullScreen) painterResource(id = R.drawable.fullscreen) else painterResource(
                        id = R.drawable.exit_fullscreen
                    ),
                    contentDescription = "Switching Screens",
                    modifier = Modifier.padding(8.dp)
                )
            }
        },
        bottomBar = {
            if (!isFullScreen) {
                Box(
                    modifier = Modifier
                        .fillMaxWidth()
                        .height(30.dp)
                        .background(colorResource(id = R.color.app_green)),
                    contentAlignment = Alignment.Center
                ) {
                    Text(
                        text = "$currentPage / $totalPages",
                        fontSize = 16.sp,
                        color = Color.White,
                        fontWeight = FontWeight.Bold,
                        modifier = Modifier.align(Alignment.Center)
                    )
                }
            }
        }
    )
}

fun getFileName(manzil: Int): String {
    Log.d("Check Pdf", "getFileName: called!")
    when (manzil) {
        R.string.first_manzil -> {
            return "first_manzil.pdf"
        }

        R.string.second_manzil -> {
            return "second_manzil.pdf"
        }

        R.string.third_manzil -> {
            return "third_manzil.pdf"
        }

        R.string.fourth_manzil -> {
            return "forth_manzil.pdf"
        }

        R.string.fifth_manzil -> {
            return "fifth_manzil.pdf"
        }

        R.string.sixth_manzil -> {
            return "sixth_manzil.pdf"
        }

        R.string.seventh_manzil -> {
            return "seventh_manzil.pdf"
        }

        else -> {
            return "Intro.pdf"
        }
    }
}

I want to update the UI or recall the PdfView composable when the filename changes.

New contributor

Muhammad Umair Rasheed is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật