-
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
468 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# 更新日志 | ||
|
||
## 2.2.1(74) | ||
|
||
- 【新增】教程新增学习记录 | ||
|
||
## 2.2.0(73) | ||
|
||
- 【新增】二楼修改为书籍教程 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
app/src/main/java/per/goweii/wanandroid/db/migration/Migrations.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@file:Suppress("ClassName") | ||
|
||
package per.goweii.wanandroid.db.migration | ||
|
||
import androidx.room.migration.Migration | ||
import androidx.sqlite.db.SupportSQLiteDatabase | ||
|
||
class Migration_1_2 : Migration(1, 2) { | ||
override fun migrate(database: SupportSQLiteDatabase) { | ||
database.beginTransaction() | ||
try { | ||
database.execSQL("ALTER TABLE ReadRecordModel ADD COLUMN percent INTEGER NOT NULL DEFAULT 0") | ||
database.execSQL("ALTER TABLE ReadRecordModel ADD COLUMN lastTime INTEGER NOT NULL DEFAULT 0") | ||
database.setTransactionSuccessful() | ||
} catch (e: Throwable) { | ||
e.printStackTrace() | ||
} finally { | ||
database.endTransaction() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
app/src/main/java/per/goweii/wanandroid/event/ReadRecordAddedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package per.goweii.wanandroid.event; | ||
|
||
import io.reactivex.annotations.NonNull; | ||
import per.goweii.wanandroid.db.model.ReadRecordModel; | ||
|
||
/** | ||
* @author CuiZhen | ||
* @date 2019/5/17 | ||
* GitHub: https://github.com/goweii | ||
*/ | ||
public class ReadRecordAddedEvent extends BaseEvent { | ||
private final ReadRecordModel readRecordModel; | ||
|
||
public ReadRecordAddedEvent(@NonNull ReadRecordModel readRecordModel) { | ||
this.readRecordModel = readRecordModel; | ||
} | ||
|
||
@NonNull | ||
public ReadRecordModel getReadRecordModel() { | ||
return readRecordModel; | ||
} | ||
} |
9 changes: 0 additions & 9 deletions
9
app/src/main/java/per/goweii/wanandroid/event/ReadRecordEvent.java
This file was deleted.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
app/src/main/java/per/goweii/wanandroid/event/ReadRecordUpdateEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package per.goweii.wanandroid.event; | ||
|
||
import io.reactivex.annotations.NonNull; | ||
|
||
public class ReadRecordUpdateEvent extends BaseEvent { | ||
private final String mLink; | ||
private String mTitle; | ||
private Long mTime; | ||
private Float mPercent; | ||
|
||
public ReadRecordUpdateEvent(@NonNull String link) { | ||
this.mLink = link; | ||
} | ||
|
||
public String getLink() { | ||
return mLink; | ||
} | ||
|
||
public String getTitle() { | ||
return mTitle; | ||
} | ||
|
||
public void setTitle(String title) { | ||
this.mTitle = title; | ||
} | ||
|
||
public Long getTime() { | ||
return mTime; | ||
} | ||
|
||
public void setTime(Long time) { | ||
this.mTime = time; | ||
} | ||
|
||
public Float getPercent() { | ||
return mPercent; | ||
} | ||
|
||
public void setPercent(Float percent) { | ||
this.mPercent = percent; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.