Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
bc27c6f5
Commit
bc27c6f5
authored
Aug 30, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another fix for analyticsManager not initialized
parent
4a2cf20f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
2 deletions
+24
-2
AboutFragmentProvider.kt
...ava/chat/rocket/android/about/di/AboutFragmentProvider.kt
+12
-0
AboutFragment.kt
...c/main/java/chat/rocket/android/about/ui/AboutFragment.kt
+10
-2
ActivityBuilder.kt
...java/chat/rocket/android/dagger/module/ActivityBuilder.kt
+2
-0
No files found.
app/src/main/java/chat/rocket/android/about/di/AboutFragmentProvider.kt
0 → 100644
View file @
bc27c6f5
package
chat.rocket.android.about.di
import
chat.rocket.android.about.ui.AboutFragment
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
@Module
abstract
class
AboutFragmentProvider
{
@ContributesAndroidInjector
()
abstract
fun
provideAboutFragment
():
AboutFragment
}
app/src/main/java/chat/rocket/android/about/ui/AboutFragment.kt
View file @
bc27c6f5
...
...
@@ -10,6 +10,7 @@ import chat.rocket.android.R
import
chat.rocket.android.analytics.AnalyticsManager
import
chat.rocket.android.analytics.event.ScreenViewEvent
import
chat.rocket.android.main.ui.MainActivity
import
dagger.android.support.AndroidSupportInjection
import
kotlinx.android.synthetic.main.app_bar.*
import
kotlinx.android.synthetic.main.fragment_about.*
import
javax.inject.Inject
...
...
@@ -20,6 +21,11 @@ class AboutFragment : Fragment() {
@Inject
lateinit
var
analyticsManager
:
AnalyticsManager
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
AndroidSupportInjection
.
inject
(
this
)
}
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
...
...
@@ -36,8 +42,10 @@ class AboutFragment : Fragment() {
private
fun
setupViews
()
{
text_version_name
.
text
=
BuildConfig
.
VERSION_NAME
text_build_number
.
text
=
getString
(
R
.
string
.
msg_build
,
BuildConfig
.
VERSION_CODE
,
BuildConfig
.
GIT_SHA
,
BuildConfig
.
FLAVOR
)
text_build_number
.
text
=
getString
(
R
.
string
.
msg_build
,
BuildConfig
.
VERSION_CODE
,
BuildConfig
.
GIT_SHA
,
BuildConfig
.
FLAVOR
)
}
private
fun
setupToolbar
()
{
...
...
app/src/main/java/chat/rocket/android/dagger/module/ActivityBuilder.kt
View file @
bc27c6f5
package
chat.rocket.android.dagger.module
import
chat.rocket.android.about.di.AboutFragmentProvider
import
chat.rocket.android.authentication.di.AuthenticationModule
import
chat.rocket.android.authentication.login.di.LoginFragmentProvider
import
chat.rocket.android.authentication.registerusername.di.RegisterUsernameFragmentProvider
...
...
@@ -58,6 +59,7 @@ abstract class ActivityBuilder {
CreateChannelProvider
::
class
,
ProfileFragmentProvider
::
class
,
SettingsFragmentProvider
::
class
,
AboutFragmentProvider
::
class
,
PreferencesFragmentProvider
::
class
]
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment