Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DROID-3390 Primitives | Don't show file fields in the sidebar #2118

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,11 @@ suspend fun buildUiFieldsList(
add(Section.SideBar(canAdd = false))
addAll(sidebarItems)

if (fileRecommendedFields.isNotEmpty()) {
add(Section.File(canAdd = false))
addAll(fileRecommendedFields)
}
//todo file fields are off for now
// if (fileRecommendedFields.isNotEmpty()) {
// add(Section.File(canAdd = false))
// addAll(fileRecommendedFields)
// }

if (showHiddenFields) {
add(Section.Hidden(canAdd = false))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import com.anytypeio.anytype.core_models.Key
import com.anytypeio.anytype.core_models.ObjectViewDetails
import com.anytypeio.anytype.core_models.ObjectWrapper
import com.anytypeio.anytype.core_models.Payload
import com.anytypeio.anytype.core_models.Relation
import com.anytypeio.anytype.core_models.RelationFormat
import com.anytypeio.anytype.core_models.Relations
import com.anytypeio.anytype.core_models.TimeInMillis
Expand Down Expand Up @@ -176,10 +175,20 @@ class RelationListViewModel(
add(Model.Section.Header)
addAll(headerFields)
}
if (sidebarFields.isNotEmpty() || filesFields.isNotEmpty()) {
add(Model.Section.SideBar)
addAll(sidebarFields + filesFields)

//todo file fields are off for now
if (false) {
if (sidebarFields.isNotEmpty() || filesFields.isNotEmpty()) {
add(Model.Section.SideBar)
addAll(sidebarFields + filesFields)
}
} else {
if (sidebarFields.isNotEmpty()) {
add(Model.Section.SideBar)
addAll(sidebarFields)
}
}

if (localFields.isNotEmpty()) {
add(Model.Section.Local)
addAll(localFields)
Expand Down