Skip to content

Commit

Permalink
changed logout display in menu and default safety link (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
aniri authored Dec 3, 2020
1 parent d761891 commit 8b514e5
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 20 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ android {
applicationId "ro.code4.monitorizarevot"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
versionCode 42
versionName "2.1.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

javaCompileOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ class MainActivity : BaseActivity<MainViewModel>() {
showVisitedPollingStations()
true
}
R.id.nav_logout -> {
viewModel.logout()
true
}
else -> false
}
}
}

navLogout.setOnClickListener {
viewModel.logout()
}

viewModel.onLogoutLiveData().observe(this, Observer {
startActivityWithoutTrace(LoginActivity::class.java)
})
Expand Down
12 changes: 0 additions & 12 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/main_menu">

<TextView
android:id="@+id/navLogout"
style="@style/NavigationMenuItem"
android:layout_width="match_parent"
android:layout_marginStart="@dimen/margin"
android:layout_marginEnd="@dimen/margin"
android:drawableStart="@drawable/ic_menu_logout"
android:drawablePadding="@dimen/margin"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:text="@string/menu_logout" />

</com.google.android.material.navigation.NavigationView>

</androidx.drawerlayout.widget.DrawerLayout>
10 changes: 10 additions & 0 deletions app/src/main/res/menu/main_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,15 @@
android:icon="@drawable/ic_menu_guide"
android:title="@string/menu_obs_feedback" />

<item
android:checkable="false"
android:enabled="false"
android:title="" />

<item
android:id="@+id/nav_logout"
android:icon="@drawable/ic_menu_logout"
android:title="@string/menu_logout" />

</group>
</menu>
2 changes: 1 addition & 1 deletion debug.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiUrl=https://api.votemonitor.org/api/v1/
guideUrl=https://fiecarevot.ro/wp-content/uploads/2020/12/Manual-observatori-FV-parlamentare2020.pdf
safetyUrl=https://votromania.ro/siguranta-la-vot
safetyUrl=
observerFeedbackUrl=
organisationWebUrl=https://code4.ro/
serviceCenterPhoneNumber=0800080200
Expand Down
2 changes: 1 addition & 1 deletion release.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiUrl=https://api.votemonitor.org/api/v1/
guideUrl=https://fiecarevot.ro/wp-content/uploads/2020/12/Manual-observatori-FV-parlamentare2020.pdf
safetyUrl=https://votromania.ro/siguranta-la-vot
safetyUrl=
observerFeedbackUrl=
organisationWebUrl=https://code4.ro/
serviceCenterPhoneNumber=0800080200
Expand Down

0 comments on commit 8b514e5

Please sign in to comment.