Skip to content

Commit ade1483

Browse files
committed
fix SpotifyAPI#isTokenValid logic
1 parent d247a60 commit ade1483

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repositories {
2929
jcenter()
3030
}
3131
32-
compile group: 'com.adamratzman', name: 'spotify-api-kotlin', version: '2.3.06'
32+
compile group: 'com.adamratzman', name: 'spotify-api-kotlin', version: '2.3.07'
3333
```
3434

3535
To use the latest snapshot instead, you must add the Jitpack repository as well
@@ -51,7 +51,7 @@ dependencies {
5151
<dependency>
5252
<groupId>com.adamratzman</groupId>
5353
<artifactId>spotify-api-kotlin</artifactId>
54-
<version>2.3.06</version>
54+
<version>2.3.07</version>
5555
</dependency>
5656
5757
<repository>

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ apply plugin: 'kotlin'
2222
apply plugin: 'org.jetbrains.dokka'
2323

2424
group 'com.adamratzman'
25-
version '2.3.06'
25+
version '2.3.07'
2626

2727
archivesBaseName = 'spotify-api-kotlin'
2828

src/main/kotlin/com/adamratzman/spotify/SpotifyAPI.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ abstract class SpotifyAPI internal constructor(
171171
* @return [TokenValidityResponse] containing whether this token is valid, and if not, an Exception explaining why
172172
*/
173173
fun isTokenValid(makeTestRequest: Boolean = true): TokenValidityResponse {
174-
if (!token.shouldRefresh()) return TokenValidityResponse(false, SpotifyException("Token expired"))
174+
if (token.shouldRefresh()) return TokenValidityResponse(false, SpotifyException("Token needs to be refreshed (is it expired?)"))
175175
if (!makeTestRequest) return TokenValidityResponse(true, null)
176176

177177
return try {

0 commit comments

Comments
 (0)