This commit is contained in:
Leon Bösche
2026-01-09 22:11:15 +01:00
parent bb33ad1241
commit cfeae0a199

View File

@@ -300,7 +300,9 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
}
return Padding(
padding: EdgeInsets.only(
top: MediaQuery.of(context).size.width < 600 ? 60.0 : 78.0,
top: MediaQuery.of(context).size.width < 600
? 60.0
: 78.0,
),
child: AnimatedContainer(
duration: const Duration(milliseconds: 350),
@@ -328,7 +330,8 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
>(
listener: (context, state) {
if (state is OrganizationLoaded) {
final orgId = state.selectedOrg?.id ?? '';
final orgId =
state.selectedOrg?.id ?? '';
// Reload file browser when org changes (or when falling back to personal workspace)
context.read<FileBrowserBloc>().add(
LoadDirectory(
@@ -347,13 +350,23 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
if (orgState
is OrganizationInitial) {
WidgetsBinding.instance
.addPostFrameCallback((_) {
.addPostFrameCallback((
_,
) {
// Kick off org fetch and immediately show personal workspace
// while org data loads.
context.read<OrganizationBloc>().add(
context
.read<
OrganizationBloc
>()
.add(
LoadOrganizations(),
);
context.read<FileBrowserBloc>().add(
context
.read<
FileBrowserBloc
>()
.add(
const LoadDirectory(
orgId: '',
path: '/',
@@ -495,7 +508,9 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
gradient: LinearGradient(
colors: [
Colors.white.withValues(alpha: 0),
Colors.white.withValues(alpha: 0.06),
Colors.white.withValues(
alpha: 0.06,
),
Colors.white.withValues(alpha: 0),
],
),
@@ -561,7 +576,11 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
const SizedBox(width: 16),
_buildNavButton('Add', Icons.add),
const SizedBox(width: 16),
_buildNavButton('Profile', Icons.person, isAvatar: true),
_buildNavButton(
'Profile',
Icons.person,
isAvatar: true,
),
],
),
);