Compare commits

...

19 Commits

Author SHA1 Message Date
12046ef0a0 Merge branch 'release/0.10.2' 2019-09-10 13:01:38 +02:00
dfc84b4208 Version 0.10.2 2019-09-10 12:58:27 +02:00
f5f11d5130 Fix login in symbol view (#493) 2019-09-10 12:25:08 +02:00
81ce328abd Bump recyclerview from 1.1.0-beta03 to 1.1.0-beta04 (#504) 2019-09-09 14:05:04 +00:00
867951136a Bump gradle-play-publisher from cdaeb61 to 2.4.0 (#501) 2019-09-09 13:43:55 +00:00
8b41ab27bd Bump mockito-core from 3.0.6 to 3.0.7 (#502) 2019-09-09 09:25:52 +00:00
e542ef003c Bump mockito-android from 3.0.6 to 3.0.7 (#503) 2019-09-09 08:54:03 +00:00
a5f212e6be Bump room from 2.2.0-beta01 to 2.2.0-rc01 (#499) 2019-09-09 08:39:39 +00:00
385a320536 Bump google-services from 4.3.1 to 4.3.2 (#498) 2019-09-09 08:25:51 +00:00
e65000ec2c Bump mockito-inline from 3.0.6 to 3.0.7 (#497) 2019-09-09 08:25:29 +00:00
c87de7b3c2 Bump logging-interceptor from 3.12.3 to 3.12.4 (#496) 2019-09-09 08:23:22 +00:00
bb6023709f Fix grade details header unread info (#494) 2019-09-08 15:10:29 +02:00
e998e54d3e Merge tag '0.10.1' into develop
Version 0.10.1
2019-09-07 02:25:22 +02:00
e269886eae Merge branch 'release/0.10.1' 2019-09-07 02:25:12 +02:00
dabb83c522 Version 0.10.1 2019-09-07 02:23:44 +02:00
6350b72e23 Fix account icon color in widgets (#488) 2019-09-06 18:23:51 +02:00
e4100d940a Fix crashing tab layout on prelolipop (#492) 2019-09-06 13:55:26 +02:00
6575674169 Fix about_feedback_summary typo (#487) 2019-09-05 18:57:37 +02:00
a13aad984c Merge tag '0.10.0' into develop
Version 0.10.0
2019-09-04 22:59:40 +02:00
18 changed files with 64 additions and 66 deletions

View File

@ -14,7 +14,7 @@ cache:
branches:
only:
- develop
- 0.10.0
- 0.10.2
android:
licenses:

View File

@ -17,8 +17,8 @@ android {
testApplicationId "io.github.tests.wulkanowy"
minSdkVersion 16
targetSdkVersion 28
versionCode 43
versionName "0.10.0"
versionCode 45
versionName "0.10.2"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
@ -110,11 +110,11 @@ play {
ext {
work_manager = "2.2.0"
room = "2.2.0-beta01"
room = "2.2.0-rc01"
dagger = "2.24"
chucker = "2.0.4"
mockk = "1.9.2"
mockito_core = "3.0.6"
mockito_core = "3.0.7"
}
configurations.all {
@ -123,19 +123,19 @@ configurations.all {
}
dependencies {
implementation "io.github.wulkanowy:api:0.10.0"
implementation "io.github.wulkanowy:api:0.10.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "androidx.core:core-ktx:1.1.0-rc03"
implementation "androidx.activity:activity-ktx:1.0.0-rc01"
implementation "androidx.appcompat:appcompat:1.1.0-rc01"
implementation "androidx.appcompat:appcompat-resources:1.1.0-rc01"
implementation "androidx.fragment:fragment-ktx:1.1.0-rc04"
implementation "androidx.core:core-ktx:1.1.0"
implementation "androidx.activity:activity-ktx:1.0.0"
implementation "androidx.appcompat:appcompat:1.1.0"
implementation "androidx.appcompat:appcompat-resources:1.1.0"
implementation "androidx.fragment:fragment-ktx:1.1.0"
implementation "androidx.annotation:annotation:1.1.0"
implementation "androidx.multidex:multidex:2.0.1"
implementation "androidx.preference:preference-ktx:1.1.0-rc01"
implementation "androidx.recyclerview:recyclerview:1.1.0-beta03"
implementation "androidx.preference:preference-ktx:1.1.0"
implementation "androidx.recyclerview:recyclerview:1.1.0-beta04"
implementation "androidx.viewpager:viewpager:1.0.0"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
implementation "androidx.constraintlayout:constraintlayout:1.1.3"
@ -173,7 +173,7 @@ dependencies {
implementation "com.jakewharton.threetenabp:threetenabp:1.2.1"
implementation "com.jakewharton.timber:timber:4.7.1"
implementation "at.favre.lib:slf4j-timber:1.0.1"
implementation "com.squareup.okhttp3:logging-interceptor:3.12.3"
implementation "com.squareup.okhttp3:logging-interceptor:3.12.4"
implementation "com.mikepenz:aboutlibraries:7.0.3"
playImplementation "com.google.firebase:firebase-core:17.2.0"
@ -188,7 +188,7 @@ dependencies {
testImplementation "io.mockk:mockk:$mockk"
testImplementation "org.threeten:threetenbp:1.4.0"
testImplementation "org.mockito:mockito-core:$mockito_core"
testImplementation("org.mockito:mockito-inline:3.0.6") {
testImplementation("org.mockito:mockito-inline:3.0.7") {
exclude group: "org.mockito", module: "mockito-core"
}
@ -199,7 +199,7 @@ dependencies {
androidTestImplementation "androidx.room:room-testing:$room"
androidTestImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
androidTestImplementation "org.mockito:mockito-core:$mockito_core"
androidTestImplementation("org.mockito:mockito-android:3.0.6") {
androidTestImplementation("org.mockito:mockito-android:3.0.7") {
exclude group: 'org.mockito', module: 'mockito-core'
}
}

View File

@ -42,4 +42,4 @@
#Config for Material Components
-keep class com.google.android.material.tabs.**
-keep class com.google.android.material.tabs.** { *; }

View File

@ -28,5 +28,6 @@ class LoginErrorHandler @Inject constructor(
override fun clear() {
super.clear()
onBadCredentials = {}
onStudentDuplicate = {}
}
}

View File

@ -38,8 +38,7 @@ class LoginFormFragment : BaseFragment(), LoginFormView {
override val formPassValue get() = loginFormPass.text.toString()
override val formHostValue
get() = hostValues.getOrNull(hostKeys.indexOf(loginFormHost.text.toString()))
override val formHostValue get() = hostValues[(hostKeys.indexOf(loginFormHost.text.toString()))]
private lateinit var hostKeys: Array<String>
@ -152,7 +151,7 @@ class LoginFormFragment : BaseFragment(), LoginFormView {
Triple(
loginFormName.text.toString(),
loginFormPass.text.toString(),
resources.getStringArray(R.array.endpoints_values)[1]
formHostValue
))
}

View File

@ -40,7 +40,7 @@ class LoginFormPresenter @Inject constructor(
view?.apply {
clearPassError()
clearNameError()
if (formHostValue?.contains("fakelog") == true) setCredentials("jan@fakelog.cf", "jan123")
if (formHostValue.contains("fakelog")) setCredentials("jan@fakelog.cf", "jan123")
}
}

View File

@ -11,7 +11,7 @@ interface LoginFormView : BaseView {
val formPassValue: String
val formHostValue: String?
val formHostValue: String
fun setCredentials(name: String, pass: String)

View File

@ -2,6 +2,7 @@ package io.github.wulkanowy.ui.modules.luckynumberwidget
import android.annotation.SuppressLint
import android.view.View
import androidx.core.graphics.ColorUtils
import eu.davidea.flexibleadapter.FlexibleAdapter
import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
import eu.davidea.flexibleadapter.items.IFlexible
@ -9,6 +10,7 @@ import eu.davidea.viewholders.FlexibleViewHolder
import io.github.wulkanowy.R
import io.github.wulkanowy.data.db.entities.Student
import io.github.wulkanowy.ui.modules.timetablewidget.TimetableWidgetConfigureItem
import io.github.wulkanowy.utils.getThemeAttrColor
import kotlinx.android.extensions.LayoutContainer
import kotlinx.android.synthetic.main.item_account.*
@ -17,16 +19,19 @@ class LuckyNumberWidgetConfigureItem(var student: Student, val isCurrent: Boolea
override fun getLayoutRes() = R.layout.item_account
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<*>>): ViewHolder {
return ViewHolder(view, adapter)
}
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<*>>) = ViewHolder(view, adapter)
@SuppressLint("SetTextI18n")
override fun bindViewHolder(adapter: FlexibleAdapter<IFlexible<*>>, holder: ViewHolder, position: Int, payloads: MutableList<Any>) {
holder.apply {
val context = holder.contentView.context
val colorImage = if (isCurrent) context.getThemeAttrColor(R.attr.colorPrimary)
else ColorUtils.setAlphaComponent(context.getThemeAttrColor(R.attr.colorOnSurface), 153)
with(holder) {
accountItemName.text = "${student.studentName} ${student.className}"
accountItemSchool.text = student.schoolName
accountItemImage.setBackgroundResource(if (isCurrent) R.drawable.ic_account_circular_border else 0)
accountItemImage.setColorFilter(colorImage)
}
}
@ -47,8 +52,9 @@ class LuckyNumberWidgetConfigureItem(var student: Student, val isCurrent: Boolea
return result
}
class ViewHolder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter), LayoutContainer {
override val containerView: View
get() = contentView
class ViewHolder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter),
LayoutContainer {
override val containerView: View? get() = contentView
}
}

View File

@ -2,12 +2,14 @@ package io.github.wulkanowy.ui.modules.timetablewidget
import android.annotation.SuppressLint
import android.view.View
import androidx.core.graphics.ColorUtils
import eu.davidea.flexibleadapter.FlexibleAdapter
import eu.davidea.flexibleadapter.items.AbstractFlexibleItem
import eu.davidea.flexibleadapter.items.IFlexible
import eu.davidea.viewholders.FlexibleViewHolder
import io.github.wulkanowy.R
import io.github.wulkanowy.data.db.entities.Student
import io.github.wulkanowy.utils.getThemeAttrColor
import kotlinx.android.extensions.LayoutContainer
import kotlinx.android.synthetic.main.item_account.*
@ -16,16 +18,19 @@ class TimetableWidgetConfigureItem(val student: Student, private val isCurrent:
override fun getLayoutRes() = R.layout.item_account
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<*>>): ViewHolder {
return ViewHolder(view, adapter)
}
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<*>>) = ViewHolder(view, adapter)
@SuppressLint("SetTextI18n")
override fun bindViewHolder(adapter: FlexibleAdapter<IFlexible<*>>, holder: ViewHolder, position: Int, payloads: MutableList<Any>) {
holder.apply {
val context = holder.contentView.context
val colorImage = if (isCurrent) context.getThemeAttrColor(R.attr.colorPrimary)
else ColorUtils.setAlphaComponent(context.getThemeAttrColor(R.attr.colorOnSurface), 153)
with(holder) {
accountItemName.text = "${student.studentName} ${student.className}"
accountItemSchool.text = student.schoolName
accountItemImage.setBackgroundResource(if (isCurrent) R.drawable.ic_account_circular_border else 0)
accountItemImage.setColorFilter(colorImage)
}
}
@ -46,8 +51,9 @@ class TimetableWidgetConfigureItem(val student: Student, private val isCurrent:
return result
}
class ViewHolder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter), LayoutContainer {
override val containerView: View
get() = contentView
class ViewHolder(view: View, adapter: FlexibleAdapter<*>) : FlexibleViewHolder(view, adapter),
LayoutContainer {
override val containerView: View? get() = contentView
}
}

View File

@ -1,4 +1,4 @@
Wersja 0.10.0
Wersja 0.10
- odświeżyliśmy wygląd aplikacji
- poprawiliśmy wyświetlanie nauczycieli w planie lekcji

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@android:color/transparent" />
<stroke
android:width="3dp"
android:color="@color/colorPrimaryLight" />
</shape>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@android:color/transparent" />
<stroke
android:width="3dp"
android:color="@color/colorPrimary" />
</shape>

View File

@ -7,9 +7,11 @@
android:background="?selectableItemBackground"
android:paddingLeft="16dp"
android:paddingTop="10dp"
android:paddingRight="16dp"
android:paddingRight="12dp"
android:paddingBottom="10dp"
tools:context=".ui.modules.grade.details.GradeDetailsHeader">
tools:context=".ui.modules.grade.details.GradeDetailsHeader"
android:paddingEnd="12dp"
android:paddingStart="16dp">
<TextView
android:id="@+id/gradeHeaderSubject"
@ -48,7 +50,7 @@
android:textSize="12sp"
tools:text="12 grades" />
<TextView
<ImageView
android:id="@+id/gradeHeaderNote"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@ -226,7 +226,7 @@
<!--About-->
<string name="about_version">Wersja aplikacji</string>
<string name="about_feedback">Zgłoś błąd</string>
<string name="about_feedback_summary">Wyślij zgłoszenie o błedzię poprzez e-maila</string>
<string name="about_feedback_summary">Wyślij zgłoszenie o błędzie poprzez e-maila</string>
<string name="about_discord">Serwer discord</string>
<string name="about_discord_summary">Dołącz do społeczności wulkanowego</string>
<string name="about_privacy">Polityka prywatności</string>

View File

@ -10,9 +10,9 @@ buildscript {
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.google.gms:google-services:4.3.1'
classpath 'com.google.gms:google-services:4.3.2'
classpath "io.fabric.tools:gradle:1.31.0"
classpath "com.github.triplet.gradle:play-publisher:2.3.0"
classpath "com.github.triplet.gradle:play-publisher:2.4.1"
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1"
classpath "gradle.plugin.com.star-zero.gradle:githook:1.1.0"
}

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

6
gradlew vendored
View File

@ -7,7 +7,7 @@
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@ -125,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`

2
gradlew.bat vendored
View File

@ -5,7 +5,7 @@
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,