Commit 2faccb3c authored by Divyanshu Bhargava's avatar Divyanshu Bhargava

bug fix

parent 64ec3d1a
package chat.rocket.android.profile.ui package chat.rocket.android.profile.ui
import DrawableHelper import DrawableHelper
import android.app.Activity
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.support.v4.app.Fragment import android.support.v4.app.Fragment
import android.support.v7.app.AppCompatActivity
import android.support.v7.view.ActionMode import android.support.v7.view.ActionMode
import android.view.* import android.view.*
import chat.rocket.android.R import chat.rocket.android.R
...@@ -17,6 +19,7 @@ import io.reactivex.rxkotlin.Observables ...@@ -17,6 +19,7 @@ import io.reactivex.rxkotlin.Observables
import kotlinx.android.synthetic.main.app_bar.* import kotlinx.android.synthetic.main.app_bar.*
import kotlinx.android.synthetic.main.avatar_profile.* import kotlinx.android.synthetic.main.avatar_profile.*
import kotlinx.android.synthetic.main.fragment_profile.* import kotlinx.android.synthetic.main.fragment_profile.*
import timber.log.Timber
import javax.inject.Inject import javax.inject.Inject
class ProfileFragment : Fragment(), ProfileView, ActionMode.Callback { class ProfileFragment : Fragment(), ProfileView, ActionMode.Callback {
...@@ -135,7 +138,7 @@ class ProfileFragment : Fragment(), ProfileView, ActionMode.Callback { ...@@ -135,7 +138,7 @@ class ProfileFragment : Fragment(), ProfileView, ActionMode.Callback {
} }
private fun setupToolbar() { private fun setupToolbar() {
(activity as MainActivity).toolbar.title = getString(R.string.title_profile) (activity as AppCompatActivity?)?.supportActionBar?.title = getString(R.string.title_profile)
} }
private fun tintEditTextDrawableStart() { private fun tintEditTextDrawableStart() {
......
...@@ -47,7 +47,7 @@ class SettingsFragment: Fragment(), SettingsView, AdapterView.OnItemClickListene ...@@ -47,7 +47,7 @@ class SettingsFragment: Fragment(), SettingsView, AdapterView.OnItemClickListene
} }
private fun setupToolbar() { private fun setupToolbar() {
(activity as MainActivity).toolbar.title = getString(R.string.title_settings) (activity as AppCompatActivity?)?.supportActionBar?.title = getString(R.string.title_settings)
} }
private fun startNewActivity(classType: KClass<out AppCompatActivity>) { private fun startNewActivity(classType: KClass<out AppCompatActivity>) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment