Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix LastDelayForTestUrl #176

Closed
wants to merge 13 commits into from
3 changes: 3 additions & 0 deletions .github/workflows/build-pre-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ jobs:

- name: Signing properties
env:
ENCODED_KEYSTORE_BASE_64: ${{ secrets.KEYSTORE_BASE_64 }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
run: |
echo $ENCODED_KEYSTORE_BASE_64 > keystore-b64.txt
base64 -d keystore-b64.txt > release.keystore
touch signing.properties
echo keystore.password="$SIGNING_STORE_PASSWORD" > signing.properties
echo key.alias="$SIGNING_KEY_ALIAS" >> signing.properties
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,13 @@ jobs:

- name: Signing properties
env:
ENCODED_KEYSTORE_BASE_64: ${{ secrets.KEYSTORE_BASE_64 }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
run: |
echo $ENCODED_KEYSTORE_BASE_64 > keystore-b64.txt
base64 -d keystore-b64.txt > release.keystore
touch signing.properties
echo keystore.password="$SIGNING_STORE_PASSWORD" > signing.properties
echo key.alias="$SIGNING_KEY_ALIAS" >> signing.properties
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ build/
/app/foss/release
/app/premium/release
/captures
/release.keystore
release.keystore

# Ignore Gradle GUI config
gradle-app.setting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class ProxyView(
// measure delay text bounds
val delayCount = paint.breakText(
state.delayText,
false,
true,
(width - state.config.layoutPadding * 2 - state.config.contentPadding * 2)
.coerceAtLeast(0f),
null
Expand All @@ -144,15 +144,26 @@ class ProxyView(
// measure title text bounds
val titleCount = paint.breakText(
state.title,
false,
true,
mainTextWidth,
null,
)
var titleCount2: Int = 0
if (titleCount < state.title.length){
titleCount2 = paint.breakText(
state.title,
titleCount,
state.title.length,
true,
mainTextWidth,
null,
)
}

// measure subtitle text bounds
val subtitleCount = paint.breakText(
state.subtitle,
false,
true,
mainTextWidth,
null,
)
Expand All @@ -178,16 +189,25 @@ class ProxyView(
canvas.apply {
val x = state.config.layoutPadding + state.config.contentPadding
val y = state.config.layoutPadding +
(height - state.config.layoutPadding * 2) / 3f - textOffset
(height - state.config.layoutPadding * 2) / 4f - textOffset

drawText(state.title, 0, titleCount, x, y, paint)
}
if (titleCount < state.title.length){
canvas.apply {
val x = state.config.layoutPadding + state.config.contentPadding
val y = state.config.layoutPadding +
(height - state.config.layoutPadding * 2) / 4f * 2 - textOffset

drawText(state.title, titleCount, titleCount + titleCount2, x, y, paint)
}
}

// draw subtitle
canvas.apply {
val x = state.config.layoutPadding + state.config.contentPadding
val y = state.config.layoutPadding +
(height - state.config.layoutPadding * 2) / 3f * 2 - textOffset
(height - state.config.layoutPadding * 2) / 4f * 3 - textOffset

drawText(state.subtitle, 0, subtitleCount, x, y, paint)
}
Expand Down
Binary file removed release.keystore
Binary file not shown.
Loading