-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from DimensionSrl/feature/updates
Meet tab updates
- Loading branch information
Showing
40 changed files
with
1,079 additions
and
500 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
app/src/main/java/it/bz/noi/community/ui/meet/CategoryFilter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// SPDX-FileCopyrightText: NOI Techpark <digital@noi.bz.it> | ||
// | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
package it.bz.noi.community.ui.meet | ||
|
||
import it.bz.noi.community.data.models.AccountType | ||
|
||
/** | ||
* The category filter for the meet filters. | ||
*/ | ||
enum class CategoryFilter(val types: List<AccountType>) { | ||
ALL(listOf()), | ||
COMPANY(listOf(AccountType.COMPANY)), | ||
STARTUP(listOf(AccountType.STARTUP)), | ||
RESEARCH_INSTITUTION(listOf(AccountType.RESEARCH_INSTITUTION)) | ||
} |
10 changes: 10 additions & 0 deletions
10
app/src/main/java/it/bz/noi/community/ui/meet/ContactDetailListener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// SPDX-FileCopyrightText: NOI Techpark <digital@noi.bz.it> | ||
// | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
package it.bz.noi.community.ui.meet | ||
|
||
import it.bz.noi.community.data.models.Contact | ||
|
||
interface ContactDetailListener { | ||
fun openContactDetail(contact: Contact) | ||
} |
30 changes: 30 additions & 0 deletions
30
app/src/main/java/it/bz/noi/community/ui/meet/ContactVH.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// SPDX-FileCopyrightText: NOI Techpark <digital@noi.bz.it> | ||
// | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
package it.bz.noi.community.ui.meet | ||
|
||
import androidx.core.view.isVisible | ||
import androidx.recyclerview.widget.RecyclerView | ||
import it.bz.noi.community.data.models.Contact | ||
import it.bz.noi.community.databinding.VhContactBinding | ||
|
||
class ContactVH(private val binding: VhContactBinding, detailListener: ContactDetailListener) : RecyclerView.ViewHolder(binding.root) { | ||
|
||
private lateinit var contact: Contact | ||
|
||
init { | ||
binding.root.setOnClickListener { | ||
detailListener.openContactDetail(contact) | ||
} | ||
} | ||
|
||
fun bind(c: Contact) { | ||
contact = c | ||
|
||
binding.contactName.text = c.fullName | ||
binding.companyName.text = c.companyName | ||
binding.companyName.isVisible = c.companyName != null | ||
binding.contactIcon.text = "${c.firstName[0]}${c.lastName[0]}" | ||
} | ||
|
||
} |
Oops, something went wrong.