Skip to content

Commit

Permalink
remove unused resources + reformat
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Hibbe <[email protected]>
  • Loading branch information
mahibi committed Oct 2, 2023
1 parent 726215e commit 0677a7d
Show file tree
Hide file tree
Showing 10 changed files with 275 additions and 611 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ class CreateConversationDialogFragment : DialogFragment() {
.setTitle(resources.getString(R.string.nc_call_name))
// listener is null for now to avoid closing after button was clicked.
// listener is set later in onStart
.setPositiveButton("create", null)
.setNegativeButton("cancel", null)
.setPositiveButton(R.string.nc_common_create, null)
.setNegativeButton(R.string.nc_common_dismiss, null)
.setView(binding.root)
viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding.root.context, dialogBuilder)

Expand All @@ -133,8 +133,6 @@ class CreateConversationDialogFragment : DialogFragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)

themeDialog()

setupListeners()
setupStateObserver()

Expand Down Expand Up @@ -178,21 +176,6 @@ class CreateConversationDialogFragment : DialogFragment() {
}
}

private fun themeDialog() {
// viewThemeUtils.platform.colorTextView(binding.pollQuestion)
// viewThemeUtils.platform.colorTextView(binding.pollOptions)
// viewThemeUtils.platform.colorTextView(binding.pollSettings)
//
// viewThemeUtils.material.colorTextInputLayout(binding.pollCreateQuestionTextInputLayout)
//
// viewThemeUtils.material.colorMaterialButtonText(binding.pollAddOptionsItem)
// viewThemeUtils.material.colorMaterialButtonText(binding.pollDismiss)
// viewThemeUtils.material.colorMaterialButtonPrimaryFilled(binding.pollCreateButton)
//
// viewThemeUtils.platform.themeCheckbox(binding.pollPrivatePollCheckbox)
// viewThemeUtils.platform.themeCheckbox(binding.pollMultipleAnswersCheckbox)
}

private fun setupListeners() {
binding.smileyButton.setOnClickListener { emojiPopup?.toggle() }
binding.textEdit.addTextChangedListener(object : TextWatcher {
Expand Down Expand Up @@ -250,7 +233,7 @@ class CreateConversationDialogFragment : DialogFragment() {
.setInputData(data.build())
.build()

WorkManager.getInstance().enqueue(addParticipantsToConversationWorker)
WorkManager.getInstance(requireContext()).enqueue(addParticipantsToConversationWorker)

WorkManager.getInstance(requireContext()).getWorkInfoByIdLiveData(addParticipantsToConversationWorker.id)
.observeForever { workInfo: WorkInfo? ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class RenameConversationDialogFragment : DialogFragment() {

viewModel = ViewModelProvider(this, viewModelFactory)[RenameConversationViewModel::class.java]
roomToken = arguments?.getString(KEY_ROOM_TOKEN)!!
initialName = arguments?.getString(INITIAL_NAME_TO_DISPLAY)!!
initialName = arguments?.getString(INITIAL_NAME)!!
}

@SuppressLint("InflateParams")
Expand All @@ -88,8 +88,8 @@ class RenameConversationDialogFragment : DialogFragment() {
.setTitle(resources.getString(R.string.nc_call_name))
// listener is null for now to avoid closing after button was clicked.
// listener is set later in onStart
.setPositiveButton("rename", null)
.setNegativeButton("cancel", null)
.setPositiveButton(R.string.nc_rename_confirm, null)
.setNegativeButton(R.string.nc_common_dismiss, null)
.setView(binding.root)
viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding.root.context, dialogBuilder)

Expand Down Expand Up @@ -214,13 +214,13 @@ class RenameConversationDialogFragment : DialogFragment() {
companion object {
private val TAG = RenameConversationDialogFragment::class.java.simpleName
private const val KEY_ROOM_TOKEN = "keyRoomToken"
private const val INITIAL_NAME_TO_DISPLAY = "initialNameToDisplay"
private const val INITIAL_NAME = "initialName"

@JvmStatic
fun newInstance(roomTokenParam: String, initialName: String): RenameConversationDialogFragment {
val args = Bundle()
args.putString(KEY_ROOM_TOKEN, roomTokenParam)
args.putString(INITIAL_NAME_TO_DISPLAY, initialName)
args.putString(INITIAL_NAME, initialName)
val fragment = RenameConversationDialogFragment()
fragment.arguments = args
return fragment
Expand Down

This file was deleted.

34 changes: 0 additions & 34 deletions app/src/main/res/layout/activity_contacts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,40 +178,6 @@
android:textAppearance="@style/ListItem" />
</RelativeLayout>

<!-- <RelativeLayout-->
<!-- android:id="@+id/join_conversation_via_link"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginStart="@dimen/standard_margin"-->
<!-- android:layout_marginTop="@dimen/standard_half_margin"-->
<!-- android:layout_marginEnd="@dimen/standard_margin"-->
<!-- android:layout_marginBottom="@dimen/standard_half_margin"-->
<!-- android:orientation="vertical">-->

<!-- <ImageView-->
<!-- android:id="@+id/join_conversation_via_link_image"-->
<!-- android:layout_width="@dimen/avatar_size"-->
<!-- android:layout_height="@dimen/avatar_size"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:layout_marginEnd="@dimen/standard_margin"-->
<!-- android:background="@drawable/round_bgnd"-->
<!-- android:contentDescription="@null"-->
<!-- android:padding="@dimen/standard_half_padding"-->
<!-- android:src="@drawable/ic_public_black_24px"-->
<!-- app:tint="@color/white" />-->

<!-- <TextView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_centerVertical="true"-->
<!-- android:layout_toEndOf="@id/join_conversation_via_link_image"-->
<!-- android:ellipsize="middle"-->
<!-- android:singleLine="true"-->
<!-- android:text="@string/nc_join_via_link"-->
<!-- android:textAlignment="viewStart"-->
<!-- android:textAppearance="@style/ListItem" />-->
<!-- </RelativeLayout>-->

<include
android:id="@+id/controller_generic_rv"
layout="@layout/controller_generic_rv" />
Expand Down
Loading

0 comments on commit 0677a7d

Please sign in to comment.