Skip to content

Commit 5398b69

Browse files
committed
Added tooltip to recent repositories path that includes the full path (without abstracting the user path)
Fixes #306
1 parent 9cba095 commit 5398b69

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

src/main/kotlin/com/jetpackduba/gitnuro/ui/WelcomePage.kt

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import com.jetpackduba.gitnuro.theme.textButtonColors
4343
import com.jetpackduba.gitnuro.ui.components.AdjustableOutlinedTextField
4444
import com.jetpackduba.gitnuro.ui.components.BottomInfoBar
4545
import com.jetpackduba.gitnuro.ui.components.tooltip.DelayedTooltip
46+
import com.jetpackduba.gitnuro.ui.components.tooltip.InstantTooltip
4647
import com.jetpackduba.gitnuro.ui.dialogs.AppInfoDialog
4748
import com.jetpackduba.gitnuro.updates.Update
4849
import com.jetpackduba.gitnuro.viewmodels.TabViewModel
@@ -471,18 +472,20 @@ fun RecentRepositoriesList(
471472
overflow = TextOverflow.Ellipsis,
472473
)
473474

474-
Text(
475-
text = if (repoDirPath.startsWith(System.getProperty("user.home"))) {
476-
"~${repoDirPath.removePrefix(System.getProperty("user.home"))}"
477-
} else {
478-
repoDirPath
479-
},
480-
style = MaterialTheme.typography.body2,
481-
overflow = TextOverflow.Ellipsis,
482-
modifier = Modifier,
483-
maxLines = 1,
484-
color = MaterialTheme.colors.onBackgroundSecondary
485-
)
475+
InstantTooltip(repoDirPath) {
476+
Text(
477+
text = if (repoDirPath.startsWith(System.getProperty("user.home"))) {
478+
"~${repoDirPath.removePrefix(System.getProperty("user.home"))}"
479+
} else {
480+
repoDirPath
481+
},
482+
style = MaterialTheme.typography.body2,
483+
overflow = TextOverflow.Ellipsis,
484+
modifier = Modifier,
485+
maxLines = 1,
486+
color = MaterialTheme.colors.onBackgroundSecondary
487+
)
488+
}
486489
}
487490

488491

0 commit comments

Comments
 (0)