-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from amardeshbd/develop
Release for v1.3
- Loading branch information
Showing
51 changed files
with
11,788 additions
and
202 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug, help wanted, question | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. Galaxy S9+] | ||
- OS Version: [e.g. 9.0] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,17 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: enhancement, help wanted | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
82 changes: 82 additions & 0 deletions
82
android-app/app/schemas/com.blacklivesmatter.policebrutality.data.AppDatabase/3.json
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,82 @@ | ||
{ | ||
"formatVersion": 1, | ||
"database": { | ||
"version": 3, | ||
"identityHash": "a6e8d2dedfed1c349fbc1f85a78b8ab8", | ||
"entities": [ | ||
{ | ||
"tableName": "incidents", | ||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `incident_id` TEXT, `state` TEXT, `edit_url` TEXT, `city` TEXT, `name` TEXT, `date` TEXT, `date_text` TEXT, `links` TEXT NOT NULL)", | ||
"fields": [ | ||
{ | ||
"fieldPath": "_id", | ||
"columnName": "_id", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "incident_id", | ||
"columnName": "incident_id", | ||
"affinity": "TEXT", | ||
"notNull": false | ||
}, | ||
{ | ||
"fieldPath": "state", | ||
"columnName": "state", | ||
"affinity": "TEXT", | ||
"notNull": false | ||
}, | ||
{ | ||
"fieldPath": "edit_at", | ||
"columnName": "edit_url", | ||
"affinity": "TEXT", | ||
"notNull": false | ||
}, | ||
{ | ||
"fieldPath": "city", | ||
"columnName": "city", | ||
"affinity": "TEXT", | ||
"notNull": false | ||
}, | ||
{ | ||
"fieldPath": "name", | ||
"columnName": "name", | ||
"affinity": "TEXT", | ||
"notNull": false | ||
}, | ||
{ | ||
"fieldPath": "date", | ||
"columnName": "date", | ||
"affinity": "TEXT", | ||
"notNull": false | ||
}, | ||
{ | ||
"fieldPath": "date_text", | ||
"columnName": "date_text", | ||
"affinity": "TEXT", | ||
"notNull": false | ||
}, | ||
{ | ||
"fieldPath": "links", | ||
"columnName": "links", | ||
"affinity": "TEXT", | ||
"notNull": true | ||
} | ||
], | ||
"primaryKey": { | ||
"columnNames": [ | ||
"_id" | ||
], | ||
"autoGenerate": true | ||
}, | ||
"indices": [], | ||
"foreignKeys": [] | ||
} | ||
], | ||
"views": [], | ||
"setupQueries": [ | ||
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", | ||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a6e8d2dedfed1c349fbc1f85a78b8ab8')" | ||
] | ||
} | ||
} |
85 changes: 85 additions & 0 deletions
85
android-app/app/schemas/com.blacklivesmatter.policebrutality.data.AppDatabase/4.json
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,85 @@ | ||
{ | ||
"formatVersion": 1, | ||
"database": { | ||
"version": 4, | ||
"identityHash": "242e3b94374f61870cfc739505c6ed2c", | ||
"entities": [ | ||
{ | ||
"tableName": "incidents", | ||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `incident_id` TEXT, `state` TEXT, `city` TEXT, `name` TEXT, `date` TEXT, `geocoding` TEXT NOT NULL, `links` TEXT NOT NULL, PRIMARY KEY(`id`))", | ||
"fields": [ | ||
{ | ||
"fieldPath": "id", | ||
"columnName": "id", | ||
"affinity": "TEXT", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "incident_id", | ||
"columnName": "incident_id", | ||
"affinity": "TEXT", | ||
"notNull": false | ||
}, | ||
{ | ||
"fieldPath": "state", | ||
"columnName": "state", | ||
"affinity": "TEXT", | ||
"notNull": false | ||
}, | ||
{ | ||
"fieldPath": "city", | ||
"columnName": "city", | ||
"affinity": "TEXT", | ||
"notNull": false | ||
}, | ||
{ | ||
"fieldPath": "name", | ||
"columnName": "name", | ||
"affinity": "TEXT", | ||
"notNull": false | ||
}, | ||
{ | ||
"fieldPath": "date", | ||
"columnName": "date", | ||
"affinity": "TEXT", | ||
"notNull": false | ||
}, | ||
{ | ||
"fieldPath": "geocoding", | ||
"columnName": "geocoding", | ||
"affinity": "TEXT", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "links", | ||
"columnName": "links", | ||
"affinity": "TEXT", | ||
"notNull": true | ||
} | ||
], | ||
"primaryKey": { | ||
"columnNames": [ | ||
"id" | ||
], | ||
"autoGenerate": false | ||
}, | ||
"indices": [ | ||
{ | ||
"name": "index_incidents_incident_id", | ||
"unique": false, | ||
"columnNames": [ | ||
"incident_id" | ||
], | ||
"createSql": "CREATE INDEX IF NOT EXISTS `index_incidents_incident_id` ON `${TABLE_NAME}` (`incident_id`)" | ||
} | ||
], | ||
"foreignKeys": [] | ||
} | ||
], | ||
"views": [], | ||
"setupQueries": [ | ||
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", | ||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '242e3b94374f61870cfc739505c6ed2c')" | ||
] | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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
13 changes: 7 additions & 6 deletions
13
android-app/app/src/main/java/com/blacklivesmatter/policebrutality/MainViewModel.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 |
---|---|---|
@@ -1,14 +1,15 @@ | ||
package com.blacklivesmatter.policebrutality | ||
|
||
import androidx.lifecycle.ViewModel | ||
import com.blacklivesmatter.policebrutality.data.IncidentRepository | ||
import javax.inject.Inject | ||
import timber.log.Timber | ||
import javax.inject.Inject | ||
|
||
class MainViewModel @Inject constructor( | ||
private val incidentRepository: IncidentRepository | ||
) : ViewModel() { | ||
/** | ||
* The ViewModel for [MainActivity]. | ||
* For now there is nothing special going on here. All actions are managed in Fragments. | ||
*/ | ||
class MainViewModel @Inject constructor() : ViewModel() { | ||
init { | ||
Timber.d("Got incident repo: $incidentRepository") | ||
Timber.d("Main ViewModel loaded.") | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
android-app/app/src/main/java/com/blacklivesmatter/policebrutality/api/IncidentApi.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,38 @@ | ||
package com.blacklivesmatter.policebrutality.api | ||
|
||
import com.blacklivesmatter.policebrutality.data.model.Incident | ||
import com.blacklivesmatter.policebrutality.data.model.IncidentsSource | ||
import retrofit2.http.GET | ||
import retrofit2.http.Path | ||
import retrofit2.http.Query | ||
|
||
/** | ||
* Retrofit API service class for https://github.com/949mac/846-backend#api | ||
*/ | ||
interface IncidentApi { | ||
companion object { | ||
const val INCLUDE_TYPE_EVIDENCE = "evidence" | ||
} | ||
|
||
/** | ||
* List all catalog Incidents of Police Assault | ||
* The [includeType] can be [INCLUDE_TYPE_EVIDENCE] to include Video Evidence on all the incidents | ||
* | ||
* Examples: | ||
* - https://api.846policebrutality.com/api/incidents | ||
* - https://api.846policebrutality.com/api/incidents?include=evidence | ||
*/ | ||
@GET("incidents") | ||
suspend fun getAllIncidents(@Query("include") includeType: String? = null): IncidentsSource | ||
|
||
/** | ||
* Provides a Single Incident of Police Assault | ||
* The [includeType] can be [INCLUDE_TYPE_EVIDENCE] to include Video Evidence on the Incident | ||
* | ||
* Examples: | ||
* - https://api.846policebrutality.com/api/incidents/7b060ec0-a9d6-11ea-ab9b-7579ddf3de22 | ||
* - https://api.846policebrutality.com/api/incidents/7b060ec0-a9d6-11ea-ab9b-7579ddf3de22?include=evidence | ||
*/ | ||
@GET("incidents/{id}") | ||
suspend fun getIncident(@Path("id") id: String, @Query("include") includeType: String? = null): Incident | ||
} |
Oops, something went wrong.