Handle attachments in issue, pr and comments (#1304)

Closes #56

Closes #1313

Closes #1215

Closes #926

Closes #1315

Closes #1321

Closes #1322

Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1304
Co-authored-by: M M Arif <mmarif@swatian.com>
Co-committed-by: M M Arif <mmarif@swatian.com>
This commit is contained in:
M M Arif
2024-02-11 13:20:23 +00:00
committed by M M Arif
parent a3fa2344a4
commit 72a2b82558
94 changed files with 5422 additions and 4575 deletions

View File

@@ -1,48 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/primaryBackgroundColor"
android:orientation="vertical">
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/Widget.AppCompat.SearchView"
app:elevation="@dimen/dimen0dp">
android:background="?attr/primaryBackgroundColor"
android:fitsSystemWindows="true">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
<com.google.android.material.appbar.CollapsingToolbarLayout
style="?attr/collapsingToolbarLayoutLargeStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/primaryBackgroundColor">
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
android:background="?attr/primaryBackgroundColor"
app:contentScrim="?attr/primaryBackgroundColor"
android:layout_height="?attr/collapsingToolbarLayoutLargeSize">
<ImageView
android:id="@+id/close"
android:layout_width="@dimen/dimen26dp"
android:layout_height="@dimen/dimen26dp"
android:layout_marginStart="@dimen/dimen16dp"
android:layout_marginEnd="@dimen/dimen16dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="@string/close"
android:focusable="true"
android:gravity="center_vertical"
android:src="@drawable/ic_close"/>
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/topAppBar"
android:layout_width="match_parent"
android:elevation="0dp"
android:layout_height="?attr/actionBarSize"
app:title="@string/pageTitleNewPullRequest"
app:layout_collapseMode="pin"
app:menu="@menu/create_issue_menu"
app:navigationIcon="@drawable/ic_close" />
<TextView
android:id="@+id/toolbarTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:maxLines="1"
android:text="@string/pageTitleNewPullRequest"
android:textColor="?attr/primaryTextColor"
android:textSize="@dimen/dimen20sp"/>
</com.google.android.material.appbar.MaterialToolbar>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
@@ -53,12 +42,12 @@
android:layout_height="wrap_content"
android:indeterminate="true"
android:visibility="gone"
app:indicatorColor="?attr/progressIndicatorColor"/>
app:indicatorColor="?attr/progressIndicatorColor" />
<ScrollView
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/primaryBackgroundColor">
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
@@ -74,7 +63,6 @@
android:layout_marginBottom="@dimen/dimen8dp"
android:hint="@string/newIssueTitle"
android:textColorHint="?attr/hintColor"
app:boxBackgroundColor="?attr/inputBackgroundColor"
app:boxStrokeErrorColor="@color/darkRed"
app:counterEnabled="true"
app:counterMaxLength="255"
@@ -105,7 +93,6 @@
android:layout_marginBottom="@dimen/dimen8dp"
android:hint="@string/newIssueDescriptionTitle"
android:textColorHint="?attr/hintColor"
app:boxBackgroundColor="?attr/inputBackgroundColor"
app:boxStrokeErrorColor="@color/darkRed"
app:endIconMode="clear_text"
app:endIconTint="?attr/iconsColor"
@@ -146,7 +133,6 @@
android:layout_marginBottom="@dimen/dimen8dp"
android:hint="@string/mergeIntoBranch"
android:textColorHint="?attr/hintColor"
app:boxBackgroundColor="?attr/inputBackgroundColor"
app:endIconTint="?attr/iconsColor"
app:hintTextColor="?attr/hintColor">
@@ -170,7 +156,6 @@
android:layout_marginBottom="@dimen/dimen8dp"
android:hint="@string/pullFromBranch"
android:textColorHint="?attr/hintColor"
app:boxBackgroundColor="?attr/inputBackgroundColor"
app:endIconTint="?attr/iconsColor"
app:hintTextColor="?attr/hintColor">
@@ -194,7 +179,6 @@
android:layout_marginBottom="@dimen/dimen8dp"
android:hint="@string/newIssueMilestoneTitle"
android:textColorHint="?attr/hintColor"
app:boxBackgroundColor="?attr/inputBackgroundColor"
app:endIconTint="?attr/iconsColor"
app:hintTextColor="?attr/hintColor">
@@ -217,7 +201,6 @@
android:layout_marginBottom="@dimen/dimen8dp"
android:hint="@string/newIssueLabelsTitle"
android:textColorHint="?attr/hintColor"
app:boxBackgroundColor="?attr/inputBackgroundColor"
app:hintTextColor="?attr/hintColor">
<com.google.android.material.textfield.TextInputEditText
@@ -240,7 +223,6 @@
android:layout_marginBottom="@dimen/dimen8dp"
android:hint="@string/newIssueDueDateTitle"
android:textColorHint="?attr/hintColor"
app:boxBackgroundColor="?attr/inputBackgroundColor"
app:boxStrokeErrorColor="@color/darkRed"
app:endIconMode="clear_text"
app:endIconTint="?attr/iconsColor"
@@ -259,17 +241,8 @@
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/createPr"
android:layout_width="match_parent"
android:layout_height="@dimen/dimen54dp"
android:layout_marginTop="@dimen/dimen8dp"
android:text="@string/newCreateButtonCopy"
android:textColor="?attr/materialCardBackgroundColor"
android:textStyle="bold"/>
</LinearLayout>
</ScrollView>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>