Skip to content

Commit

Permalink
feat(bsky): replies and quotes (#218)
Browse files Browse the repository at this point in the history
feat: proxy service source code
feat(bsky): support replying
refactor: remove casing libs
fix: crash on profile tab navigation
fix(akkoma): updates inbox folder
fix(akkoma): broken dimensions of media thumbs
fix: casing function does not handle arrays
fix: unable to add/remove to colleciton
style: improved media thumbs in notifs
chore: v1 notification pack fn
chore(bsky): experiment with oauth
chore(bsky): width/height can be null
chore: add a settings button to edit my posts
chore: preliminary quote support
  • Loading branch information
suvam0451 authored Feb 9, 2025
1 parent a9f0276 commit 6da0f22
Show file tree
Hide file tree
Showing 113 changed files with 2,612 additions and 1,502 deletions.
21 changes: 6 additions & 15 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,22 @@ body:
- type: markdown
attributes:
value: |
Thank you for taking the time to report a bug.
No need to search for duplicate issues. Just ask away.
#### Considerations
* Support is currently only offered for latest version. So, update your app!
* The only supported backends are [Mastodon, Misskey, Firefish, Sharkey, Pleroma, Akkoma]
* ^ You may request support for additional backends via "Feature Request"
Don't worry about duplicate issues. Just ask what you want ^^
- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of what the bug is.
description: |
Describe the issue you are facing.
validations:
required: true

- type: input
id: version
attributes:
label: App Version
description: The app version this issue occurs on.
placeholder: "v0.9.0 or v0.9.0-lite"
description: App version can be seen in the settings screen
placeholder: "v0.15.3"
validations:
required: true
- type: dropdown
Expand All @@ -42,10 +34,9 @@ body:
multiple: false
options:
- Play Store
- GitHub Releases
- GitHub (Lite)
- IzzyOnDroid (Lite)
- Self-Compiled
- Self-Compiled (Lite)
validations:
required: true

Expand Down
5 changes: 3 additions & 2 deletions apps/mobile/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ const expo = ({ config }: ConfigContext): ExpoConfig => ({
...config,
name: APP_NAME,
slug: 'dhaaga',
version: '0.15.3',
version: '0.15.4',
orientation: 'portrait',
icon: './assets/icon.png',
userInterfaceStyle: 'dark',
scheme: 'dhaaga',
jsEngine: 'hermes',
platforms: ['android'],
developmentClient: {
silentLaunch: true,
Expand All @@ -25,7 +26,7 @@ const expo = ({ config }: ConfigContext): ExpoConfig => ({
},
android: {
package: BUNDLE_ID,
versionCode: 28,
versionCode: 29,
blockedPermissions: [
'android.permission.SYSTEM_ALERT_WINDOW',
'android.permission.READ_EXTERNAL_STORAGE',
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/app/(tabs)/index/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useMemo } from 'react';
import { StyleProp, View, ViewStyle } from 'react-native';
import { APP_LANDING_PAGE_TYPE } from '../../../components/shared/topnavbar/AppTabLandingNavbar';
import AppNoAccount from '../../../components/error-screen/AppNoAccount';
import AddAccountPresenter from '../../../features/onboarding/presenters/AddAccountPresenter';
import SocialHubPresenter from '../../../features/social-hub/presenters/SocialHubPresenter';
import SoftwareHeader from '../../../screens/accounts/fragments/SoftwareHeader';
import { Account } from '../../../database/_schema';
Expand Down Expand Up @@ -167,7 +167,7 @@ function Screen() {
loadAccounts();
}, [acct]);

if (!acct) return <AppNoAccount tab={APP_LANDING_PAGE_TYPE.HOME} />;
if (!acct) return <AddAccountPresenter tab={APP_LANDING_PAGE_TYPE.HOME} />;
return <SocialHubPresenter />;
}

Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/app/(tabs)/profile/account/lists.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import MyLists from '../../../../components/screens/profile/stack/MyLists';
import MyListsPresenter from '../../../../features/my-account/presenters/MyListsPresenter';

function BookmarkClassic() {
return <MyLists />;
return <MyListsPresenter />;
}

export default BookmarkClassic;
6 changes: 1 addition & 5 deletions apps/mobile/app/(tabs)/profile/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import MyAccountPresenter from '../../../features/my-account/presenters/MyAccountPresenter';

function Page() {
return <MyAccountPresenter />;
}

export default Page;
export default MyAccountPresenter;
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,33 @@ import {
} from '../../../../hooks/utility/global-state-extractors';
import { APP_EVENT_ENUM } from '../../../../services/publishers/app.publisher';
import { Loader } from '../../../../components/lib/Loader';
import { Image } from 'expo-image';
import { useAssets } from 'expo-asset';
import Ionicons from '@expo/vector-icons/Ionicons';
import { LinkingUtils } from '../../../../utils/linking.utils';
import useAtprotoLogin from '../../../../features/onboarding/interactors/useAtprotoLogin';
import { useTranslation } from 'react-i18next';
import { LOCALIZATION_NAMESPACE } from '../../../../types/app.types';

function SigninBsky() {
// WebBrowser.maybeCompleteAuthSession();

function AddBluesky() {
const [IsLoading, setIsLoading] = useState(false);
const { theme } = useAppTheme();
const { db } = useAppDb();
const { loadAccounts } = useHub();
const { translateY } = useScrollMoreOnPageEnd();
const { appSub } = useAppPublishers();
const { t } = useTranslation([LOCALIZATION_NAMESPACE.CORE]);

const [Username, setUsername] = useState(null);
const [Password, setPassword] = useState(null);
const [assets, error] = useAssets([
require('../../../../assets/branding/bluesky/logo.png'),
require('../../../../assets/icon.png'),
]);

const { isLoading } = useAtprotoLogin();

async function onSubmit() {
setIsLoading(true);
Expand Down Expand Up @@ -59,21 +75,88 @@ function SigninBsky() {
}
}

if (error || !assets)
return (
<AppTopNavbar
title={t(`topNav.secondary.blueskySignIn`)}
translateY={translateY}
type={APP_TOPBAR_TYPE_ENUM.GENERIC}
>
<View style={{ flex: 1 }} />
</AppTopNavbar>
);

return (
<AppTopNavbar
title={'Bluesky Sign In'}
title={t(`topNav.secondary.blueskySignIn`)}
translateY={translateY}
type={APP_TOPBAR_TYPE_ENUM.GENERIC}
>
<ScrollView
contentContainerStyle={{ paddingTop: 54, paddingHorizontal: 8 }}
>
<View style={{ height: 32 }} />
<AppText.H1
style={{ textAlign: 'center', paddingVertical: 16, marginBottom: 32 }}

<View
style={{
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
marginHorizontal: 'auto',
}}
>
Enter Server Details
</AppText.H1>
{/*@ts-ignore-next-line*/}
<Image
source={{ uri: assets[0].localUri }}
style={{
width: 84,
height: 84,
marginHorizontal: 'auto',
borderRadius: 16,
backgroundColor: '#1f2836',
}}
contentFit={'cover'}
/>
<Ionicons
name={'close-outline'}
color={theme.secondary.a50}
size={32}
style={{ marginHorizontal: 16 }}
/>
{/*@ts-ignore-next-line*/}
<Image
source={{ uri: assets[1].localUri }}
style={{
width: 84,
height: 84,
marginHorizontal: 'auto',
borderRadius: 16,
}}
/>
</View>
<View style={{ marginBottom: 32 }}>
<AppText.Medium
style={{
textAlign: 'center',
paddingTop: 16,
paddingBottom: 8,
fontSize: 20,
}}
>
{t(`onboarding.needBlueskyAccount`)}
</AppText.Medium>
<AppText.Medium
style={{
color: theme.complementary.a0,
fontSize: 18,
textAlign: 'center',
}}
onPress={LinkingUtils.openBluesky}
>
{t(`onboarding.createOneHere`)}
</AppText.Medium>
</View>

<View style={styles.inputContainerRoot}>
<View style={styles.inputContainer}>
<AntDesign name="user" size={24} color={theme.secondary.a30} />
Expand All @@ -82,14 +165,14 @@ function SigninBsky() {
<TextInput
style={{
fontSize: 16,
color: theme.secondary.a30,
color: theme.secondary.a10,
textDecorationLine: 'none',
fontFamily: APP_FONTS.INTER_500_MEDIUM,
flex: 1,
}}
autoCapitalize={'none'}
placeholderTextColor={theme.secondary.a30}
placeholder="Username or email address"
placeholder="handle.bsky.social"
onChangeText={setUsername}
value={Username}
/>
Expand All @@ -101,21 +184,21 @@ function SigninBsky() {
<TextInput
style={{
fontSize: 16,
color: theme.secondary.a30,
color: theme.secondary.a10,
textDecorationLine: 'none',
fontFamily: APP_FONTS.INTER_500_MEDIUM,
flex: 1,
}}
autoCapitalize={'none'}
placeholder="App Password"
placeholder={t(`onboarding.appPassword`)}
placeholderTextColor={theme.secondary.a30}
onChangeText={setPassword}
value={Password}
/>
</View>

<View style={{ alignItems: 'center', marginTop: 16 }}>
{IsLoading ? (
{IsLoading || isLoading ? (
<View style={{ paddingVertical: 16 }}>
<Loader />
</View>
Expand All @@ -127,7 +210,7 @@ function SigninBsky() {
buttonStyle={{ width: 128, borderRadius: 8 }}
>
<AppText.SemiBold style={{ fontSize: 16, color: 'black' }}>
Log In
{t(`onboarding.loginButton`)}
</AppText.SemiBold>
</Button>
)}
Expand All @@ -148,4 +231,4 @@ const styles = StyleSheet.create({
inputContainer: { width: 24 + 8 * 2, padding: 8 },
});

export default SigninBsky;
export default AddBluesky;
9 changes: 2 additions & 7 deletions apps/mobile/app/(tabs)/profile/onboard/add-mastodon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
import { memo } from 'react';
import MastodonServerSelect from '../../../../components/screens/profile/stack/onboard/stacks/MastodonServerSelection';
import MastodonServerSelect from '../../../../features/onboarding/presenters/MastoApiServerPresenter';

const AddMastodonStack = memo(function Foo() {
return <MastodonServerSelect />;
});

export default AddMastodonStack;
export default MastodonServerSelect;
9 changes: 2 additions & 7 deletions apps/mobile/app/(tabs)/profile/onboard/add-misskey.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
import { memo } from 'react';
import MisskeyServerSelection from '../../../../components/screens/profile/stack/onboard/stacks/MisskeyServerSelection';
import MiauthServerPresenter from '../../../../features/onboarding/presenters/MiauthServerPresenter';

const AddMisskeyStack = memo(function Foo() {
return <MisskeyServerSelection />;
});

export default AddMisskeyStack;
export default MiauthServerPresenter;
3 changes: 3 additions & 0 deletions apps/mobile/app/(tabs)/profile/onboard/signin-atproto.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import AtProtoLoginPresenter from '../../../../features/onboarding/features/atproto/presenters/AtProtoLoginPresenter';

export default AtProtoLoginPresenter;
2 changes: 1 addition & 1 deletion apps/mobile/app/(tabs)/profile/onboard/signin-md.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { memo } from 'react';
import MastoSignIn from '../../../../components/screens/profile/stack/onboard/stacks/MastodonSignIn';
import MastoSignIn from '../../../../features/onboarding/presenters/MastoApiSignIn';

const SigninMd = memo(function Foo() {
return <MastoSignIn />;
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/(tabs)/profile/onboard/signin-mk.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { memo } from 'react';
import MisskeySignIn from '../../../../components/screens/profile/stack/onboard/stacks/MisskeySignIn';
import MisskeySignIn from '../../../../features/onboarding/presenters/MiauthSignIn';

const SigninMk = memo(function Foo() {
return <MisskeySignIn />;
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/(tabs)/profile/pick-driver.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import useScrollMoreOnPageEnd from '../../../states/useScrollMoreOnPageEnd';
import AppTopNavbar from '../../../components/shared/topnavbar/AppTopNavbar';
import { AddAccountLandingFragment } from '../../../components/error-screen/AppNoAccount';
import { AddAccountLandingFragment } from '../../../features/onboarding/presenters/AddAccountPresenter';

function Page() {
const { translateY } = useScrollMoreOnPageEnd();
Expand Down
6 changes: 1 addition & 5 deletions apps/mobile/app/(tabs)/profile/settings/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import AppSettingsPage from '../../../../components/screens/profile/stack/AppSettingsPage';

function Page() {
return <AppSettingsPage />;
}

export default Page;
export default AppSettingsPage;
Loading

0 comments on commit 6da0f22

Please sign in to comment.