Skip to content

Commit aa8ce7c

Browse files
committed
fix: hide public links when there is no read permission
fix: remove updateToolbarTitle() as this is not in the requirement fix: keep simple UX refactor: remove updateMembersLoadingProgressVisibility refactor: resolve code review comment feedback fix: remove redundant properties fix: hide public links when there is no read permission fix: remove updateToolbarTitle() as this is not in the requirement fix: keep simple UX refactor: remove updateMembersLoadingProgressVisibility refactor: resolve code review comment feedback fix: remove redundant properties fix: resolve conflicts
1 parent ce035af commit aa8ce7c

File tree

3 files changed

+136
-115
lines changed

3 files changed

+136
-115
lines changed

changelog/unreleased/4803

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Bugfix: Mini FABs hidden in landscape mode
2+
3+
The FAB menu expand direction has been changed to horizontal (left) when the device is in landscape orientation, preventing the mini FABs from overflowing the screen.
4+
5+
https://github.com/owncloud/android/issues/4803

owncloudApp/src/main/java/com/owncloud/android/presentation/spaces/members/SpaceMembersFragment.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,11 @@ class SpaceMembersFragment : Fragment(), SpaceMembersAdapter.SpaceMembersAdapter
224224
addMemberRoles = it.roles
225225
val membersForList = if (canReadMembers) spaceMembers else emptyList()
226226
spaceMembersAdapter.setSpaceMembers(membersForList, roles, canRemoveMembers, canEditMembers, numberOfManagers)
227-
val hasLinks = it.links.isNotEmpty()
228-
showOrHideEmptyView(hasLinks)
229-
if (hasLinks) { showSpaceLinks(it.links) }
227+
if (canReadMembers) {
228+
val hasLinks = it.links.isNotEmpty()
229+
showOrHideEmptyView(hasLinks)
230+
if (hasLinks) { showSpaceLinks(it.links) }
231+
}
230232
binding.indeterminateProgressBar.isVisible = false
231233
}
232234
}

owncloudApp/src/main/res/layout/members_fragment.xml

Lines changed: 126 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -30,126 +30,140 @@
3030
android:layout_height="wrap_content"
3131
android:orientation="vertical">
3232

33-
<androidx.constraintlayout.widget.ConstraintLayout
33+
<LinearLayout
34+
android:id="@+id/members_list_section"
3435
android:layout_width="match_parent"
35-
android:layout_height="match_parent"
36-
android:background="@color/actionbar_start_color">
37-
38-
<TextView
39-
android:id="@+id/members_title"
40-
android:layout_width="wrap_content"
41-
android:layout_height="50dp"
42-
android:layout_centerVertical="true"
43-
android:gravity="center"
44-
android:text="@string/members_title"
45-
android:layout_marginStart="@dimen/standard_half_margin"
46-
android:textAllCaps="true"
47-
android:textColor="@color/white"
48-
android:textStyle="bold"
49-
android:accessibilityHeading="true"
50-
app:layout_constraintStart_toStartOf="parent"
51-
app:layout_constraintTop_toTopOf="parent"/>
52-
53-
<ImageButton
54-
android:id="@+id/add_member_button"
55-
android:layout_width="48dp"
56-
android:layout_height="48dp"
57-
android:padding="@dimen/standard_padding"
58-
android:background="@color/transparent"
59-
android:src="@drawable/ic_add"
60-
android:contentDescription="@string/content_description_add_member"
61-
android:visibility="gone"
62-
android:focusable="true"
63-
android:clickable="true"
64-
app:layout_constraintEnd_toEndOf="parent"
65-
app:layout_constraintTop_toTopOf="parent"
66-
tools:visibility="visible"/>
67-
68-
</androidx.constraintlayout.widget.ConstraintLayout>
69-
70-
<ProgressBar
71-
android:id="@+id/indeterminate_progress_bar"
72-
android:layout_width="wrap_content"
7336
android:layout_height="wrap_content"
74-
android:layout_gravity="center"
75-
android:indeterminate="true"
76-
android:visibility="gone"/>
37+
android:orientation="vertical">
38+
39+
<androidx.constraintlayout.widget.ConstraintLayout
40+
android:layout_width="match_parent"
41+
android:layout_height="match_parent"
42+
android:background="@color/actionbar_start_color">
43+
44+
<TextView
45+
android:id="@+id/members_title"
46+
android:layout_width="wrap_content"
47+
android:layout_height="50dp"
48+
android:layout_centerVertical="true"
49+
android:gravity="center"
50+
android:text="@string/members_title"
51+
android:layout_marginStart="@dimen/standard_half_margin"
52+
android:textAllCaps="true"
53+
android:textColor="@color/white"
54+
android:textStyle="bold"
55+
android:accessibilityHeading="true"
56+
app:layout_constraintStart_toStartOf="parent"
57+
app:layout_constraintTop_toTopOf="parent"/>
58+
59+
<ImageButton
60+
android:id="@+id/add_member_button"
61+
android:layout_width="48dp"
62+
android:layout_height="48dp"
63+
android:padding="@dimen/standard_padding"
64+
android:background="@color/transparent"
65+
android:src="@drawable/ic_add"
66+
android:contentDescription="@string/content_description_add_member"
67+
android:visibility="gone"
68+
android:focusable="true"
69+
android:clickable="true"
70+
app:layout_constraintEnd_toEndOf="parent"
71+
app:layout_constraintTop_toTopOf="parent"
72+
tools:visibility="visible"/>
73+
74+
</androidx.constraintlayout.widget.ConstraintLayout>
75+
76+
<ProgressBar
77+
android:id="@+id/indeterminate_progress_bar"
78+
android:layout_width="wrap_content"
79+
android:layout_height="wrap_content"
80+
android:layout_gravity="center"
81+
android:indeterminate="true"
82+
android:visibility="gone"/>
7783

78-
<androidx.recyclerview.widget.RecyclerView
79-
android:id="@+id/members_recycler_view"
80-
android:layout_width="match_parent"
81-
android:layout_height="wrap_content"
82-
android:scrollbars="vertical"
83-
android:visibility="visible"
84-
tools:visibility="visible"/>
84+
<androidx.recyclerview.widget.RecyclerView
85+
android:id="@+id/members_recycler_view"
86+
android:layout_width="match_parent"
87+
android:layout_height="wrap_content"
88+
android:scrollbars="vertical"/>
8589

86-
<androidx.constraintlayout.widget.ConstraintLayout
87-
android:layout_width="match_parent"
88-
android:layout_height="match_parent"
89-
android:background="@color/actionbar_start_color">
90+
</LinearLayout>
9091

91-
<TextView
92-
android:id="@+id/public_links_title"
93-
android:layout_width="wrap_content"
94-
android:layout_height="50dp"
95-
android:layout_centerVertical="true"
96-
android:gravity="center"
97-
android:text="@string/share_via_link_section_title"
98-
android:layout_marginStart="@dimen/standard_half_margin"
99-
android:textAllCaps="true"
100-
android:textColor="@color/white"
101-
android:textStyle="bold"
102-
android:accessibilityHeading="true"
103-
app:layout_constraintStart_toStartOf="parent"
104-
app:layout_constraintTop_toTopOf="parent"/>
105-
106-
<ImageButton
107-
android:id="@+id/add_public_link_button"
108-
android:layout_width="48dp"
109-
android:layout_height="48dp"
110-
android:padding="@dimen/standard_padding"
111-
android:background="@color/transparent"
112-
android:src="@drawable/ic_add"
113-
android:contentDescription="@string/content_description_add_public_link"
114-
android:visibility="gone"
115-
android:focusable="true"
116-
android:clickable="true"
117-
app:layout_constraintEnd_toEndOf="parent"
118-
app:layout_constraintTop_toTopOf="parent"
119-
tools:visibility="visible"/>
120-
121-
</androidx.constraintlayout.widget.ConstraintLayout>
122-
123-
<TextView
124-
android:id="@+id/public_links_warning"
125-
android:layout_width="match_parent"
126-
android:layout_height="wrap_content"
127-
android:background="@color/warning_background_color"
128-
android:paddingTop="@dimen/standard_padding"
129-
android:paddingBottom="@dimen/standard_padding"
130-
android:paddingStart="@dimen/standard_half_padding"
131-
android:paddingEnd="@dimen/standard_half_padding"
132-
android:text="@string/share_warning_about_forwarding_space_public_links"
133-
android:textColor="@color/warning_grey_text"
134-
android:textSize="15sp" />
135-
136-
<androidx.recyclerview.widget.RecyclerView
137-
android:id="@+id/public_links_recycler_view"
92+
<LinearLayout
93+
android:id="@+id/public_links_section"
13894
android:layout_width="match_parent"
13995
android:layout_height="wrap_content"
140-
android:scrollbars="vertical" />
96+
android:orientation="vertical">
97+
98+
<androidx.constraintlayout.widget.ConstraintLayout
99+
android:layout_width="match_parent"
100+
android:layout_height="match_parent"
101+
android:background="@color/actionbar_start_color">
102+
103+
<TextView
104+
android:id="@+id/public_links_title"
105+
android:layout_width="wrap_content"
106+
android:layout_height="50dp"
107+
android:layout_centerVertical="true"
108+
android:gravity="center"
109+
android:text="@string/share_via_link_section_title"
110+
android:layout_marginStart="@dimen/standard_half_margin"
111+
android:textAllCaps="true"
112+
android:textColor="@color/white"
113+
android:textStyle="bold"
114+
android:accessibilityHeading="true"
115+
app:layout_constraintStart_toStartOf="parent"
116+
app:layout_constraintTop_toTopOf="parent"/>
117+
118+
<ImageButton
119+
android:id="@+id/add_public_link_button"
120+
android:layout_width="48dp"
121+
android:layout_height="48dp"
122+
android:padding="@dimen/standard_padding"
123+
android:background="@color/transparent"
124+
android:src="@drawable/ic_add"
125+
android:contentDescription="@string/content_description_add_public_link"
126+
android:visibility="gone"
127+
android:focusable="true"
128+
android:clickable="true"
129+
app:layout_constraintEnd_toEndOf="parent"
130+
app:layout_constraintTop_toTopOf="parent"
131+
tools:visibility="visible"/>
132+
133+
</androidx.constraintlayout.widget.ConstraintLayout>
141134

142-
<TextView
143-
android:id="@+id/no_public_links_message"
144-
android:layout_width="match_parent"
145-
android:layout_height="wrap_content"
146-
android:paddingTop="@dimen/standard_padding"
147-
android:paddingBottom="@dimen/standard_padding"
148-
android:paddingStart="@dimen/standard_half_padding"
149-
android:paddingEnd="@dimen/standard_half_padding"
150-
android:text="@string/share_no_public_links"
151-
android:textSize="15sp"
152-
android:visibility="gone"/>
135+
<TextView
136+
android:id="@+id/public_links_warning"
137+
android:layout_width="match_parent"
138+
android:layout_height="wrap_content"
139+
android:background="@color/warning_background_color"
140+
android:paddingTop="@dimen/standard_padding"
141+
android:paddingBottom="@dimen/standard_padding"
142+
android:paddingStart="@dimen/standard_half_padding"
143+
android:paddingEnd="@dimen/standard_half_padding"
144+
android:text="@string/share_warning_about_forwarding_space_public_links"
145+
android:textColor="@color/warning_grey_text"
146+
android:textSize="15sp" />
147+
148+
<androidx.recyclerview.widget.RecyclerView
149+
android:id="@+id/public_links_recycler_view"
150+
android:layout_width="match_parent"
151+
android:layout_height="wrap_content"
152+
android:scrollbars="vertical" />
153+
154+
<TextView
155+
android:id="@+id/no_public_links_message"
156+
android:layout_width="match_parent"
157+
android:layout_height="wrap_content"
158+
android:paddingTop="@dimen/standard_padding"
159+
android:paddingBottom="@dimen/standard_padding"
160+
android:paddingStart="@dimen/standard_half_padding"
161+
android:paddingEnd="@dimen/standard_half_padding"
162+
android:text="@string/share_no_public_links"
163+
android:textSize="15sp"
164+
android:visibility="gone"/>
165+
166+
</LinearLayout>
153167

154168
</LinearLayout>
155169

0 commit comments

Comments
 (0)