Commit Graph

16 Commits

Author SHA1 Message Date
qwerty287 325560c08d Use Gradle-native formatter (#1208)
Run `gradle :app:spotlessApply` to apply formatting.

# Changes from current code format

This does not match with the old intellij based code format because I can't apply some rules there.
- newlines after `else`, `catch` etc. (means there are `} else {` statements)
- no spaces around `if` braces (there are statements like `if (true) {` instead of `if(true) {`

Closes https://codeberg.org/gitnex/GitNex/issues/1187
Closes https://codeberg.org/gitnex/GitNex/issues/1202

Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1208
Reviewed-by: 6543 <6543@obermui.de>
Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-09-21 07:43:00 +02:00
qwerty287 a7d9918b67 Format files (#1179)
use https://codeberg.org/qwerty287/woodpecker-intellij-formatter

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: qwerty287 <ndev@web.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1179
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-08-15 16:26:02 +02:00
qwerty287 6a84e4d897 Extend CI workflows (#1155)
Extend CI workflows (-> https://codeberg.org/gitnex/GitNex/issues/1099)
	1. pull translations and push them again on every pull
       @mmarif this needs the secrets and `BOT_TOKEN`
       the code for this comes from tea4j-autodeploy
    2. add a **template** for a check workflow which only does some static checks right now. It is disabled because it requires some investigation and discussion on how we should deal with these issues. The checks are currently (if we would enable it):
    	1. check code style and formatting according to the project file in `.idea/`
        2. make sure every Java file has an `@author` annotation

I would wait until you reviewed with enabling them because we have to reformat all the files which results in changes with a few thousand changed lines (tried this once).

Closes https://codeberg.org/gitnex/GitNex/issues/141

Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1155
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-07-29 14:08:44 +02:00
qwerty287 fbe55035f2 Move to tea4j-autodeploy (#1088)
Move to https://codeberg.org/GitNex/tea4j-autodeploy as Retrofit interfaces. Closes #907 closes #1084

Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: M M Arif <mmarif@swatian.com>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1088
Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-04-18 09:10:54 +02:00
qwerty287 7e514041bb Don't use TinyDB as cache (#1034)
Do not use TinyDB as a cache or a way to send data between activities.

### How is this working

Instead of saving everything into the TinyDB, I created three `Context`s (a `RepositoryContext`, an `IssueContext` and an `AccountContext`). All are used to store things like API or database values/models and additional data, e.g. the `RepositoryContext` also contains information about the current filter state of a repository (issues, pull requests, releases/tags and milestones). These are sent using `Intent`s and `Bundle`s between activities and fragments. Changing a field (e.g. filter state) in any fragment changes it also for the whole repository (or at least it should do so).
Due to the size of the changes (after c9172f85ef, Git says `154 files changed, 3318 insertions(+), 3835 deletions(-)`) **I highly recommend you to create a beta/pre release before releasing a stable version**.
Additional changes:
* after logging out, the account remains in the account list (with a note) and you can log in again (you can't switch to this account)
* repositories and organizations are clickable on user profiles
* deleted two unused classes

Once finished, hopefully
* closes #354
* replaces #897
* fixes #947
* closes #1001
* closes #1015
* marks #876 and #578 as `Wontfix` since they are not necessary at this point
* and all the other TinyDB issues

Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1034
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-03-13 03:59:13 +01:00
qwerty287 3559f9c8bd Remove duplicated code (#1020)
* merge user grid adapters
* merge user list adapter
* merge repo list adapters if they don't use pagination
* move `BottomSheetListener` to new package `structs` (there isn't any package that fits)

Addresses #1000

Co-authored-by: qwerty287 <ndev@web.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1020
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2021-12-15 20:20:49 +01:00
opyale 093204df43 Fixing layout issues and crashes. (#810)
Fixing layout issues and crashes.

Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/810
Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
Co-Authored-By: opyale <opyale@noreply.codeberg.org>
Co-Committed-By: opyale <opyale@noreply.codeberg.org>
2021-01-26 18:43:25 +01:00
opyale a26737e510 Rewriting deprecated code and adding view bindings to all fragments and activities. (#809)
Remove jetbrain import

Merge branch 'master' into deprecations

View bindings #3

View bindings #2

View bindings #1

Rewriting deprecated code.

Co-authored-by: M M Arif <mmarif@swatian.com>
Co-authored-by: M M Arif <mmarif@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/809
Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
Co-Authored-By: opyale <opyale@noreply.codeberg.org>
Co-Committed-By: opyale <opyale@noreply.codeberg.org>
2021-01-26 16:10:31 +01:00
opyale a3bd5c2af2 Increasing performance, fixing bugs and adding syntax highlighting. (#755)
Merge branch 'performance-highlight-refactor' of https://codeberg.org/opyale/GitNex into performance-highlight-refactor

Fixing theme recognition.

Merge branch 'master' into performance-highlight-refactor

Merge commit 'refs/pull/755/head' of codeberg.org:gitnex/GitNex into performance-highlight-refactor

Add new field issueType to db

Improving theme recognition.

Fixing alignment of menu button.

Fixing cut off text.

Merge commit 'refs/pull/755/head' of codeberg.org:gitnex/GitNex into performance-highlight-refactor

Fixing crash.

Refactoring activities.

Improving drafts.

Calculating density for avatars.

Improving drafts.

Calculating density for avatars.

Increasing size of avatar.

Decreasing size of avatar.

Restoring DeepLinksActivity

Merge branch 'master' of https://codeberg.org/gitnex/GitNex into performance-highlight-refactor

 Conflicts:
	app/src/main/java/org/mian/gitnex/adapters/IssueCommentsAdapter.java

Initial commit.

Co-authored-by: M M Arif <mmarif@swatian.com>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/755
Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
2020-11-02 16:17:00 +01:00
M M Arif f64e23dcc1 Enhance settings screen and make it translation ready (#735)
Merge branch 'master' into enhance-settings-screen

# Conflicts:
#	app/src/main/java/org/mian/gitnex/activities/FileViewActivity.java

Cleanup and refactor of activities

Fix bottomsheet

enhance code blocks and refactors

Move home screen to general, make it ready for translation

Co-authored-by: M M Arif <mmarif@swatian.com>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/735
2020-10-29 14:13:19 +01:00
M M Arif 12a7b6040b App wide UI changes and refactors (#630)
Enhance and update the buttons across the app, colorful animation on tap

update toasty in view models

update toasty in fragments

update toasty in actions, activities, adapters

Alert dialogs buttons arrangements

strings fixes

switch to fab buttons

remove snackbar

Enhance whole app UI, bring consistency among the elements

Co-authored-by: M M Arif <mmarif@swatian.com>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/630
2020-08-06 17:16:51 +02:00
opyale 500dc019c1 Moving TinyDB and AppUtil to helpers. (#579)
Moving TinyDB and AppUtil to helpers.

Co-authored-by: opyale <opyale@noreply.gitea.io>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/579
Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
2020-07-07 19:15:01 +02:00
6543 c41ab845fd Refactor Context (#469)
Merge branch 'master' into fix-refactor-context

reorder + space

fix

R E F A C T O R

set ctx and appCtx in LoginActivity

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/469
Reviewed-by: M M Arif <mmarif@swatian.com>
Reviewed-by: opyale <opyale@noreply.gitea.io>
2020-04-28 13:47:25 +00:00
M M Arif 1008b8611d Added custom attr to more files 2020-03-04 19:54:21 +05:00
M M Arif b6c0e94ee9 Offline mode (#190) 2019-11-13 15:52:49 +00:00
M M Arif 39c1ec36a7 Added repo watchers/subscribrs list 2019-09-14 11:29:20 +05:00