Skip to content

Commit

Permalink
fix(v0.11.0): clear blocking bugs (#180)
Browse files Browse the repository at this point in the history
fix(mastodon): mentions tab
fix: cannot click nav element to swipe pager
chore: fix misskey mention list
fix(notifications): misskey and mastodon
fix(login): added saved client token expiry
  • Loading branch information
suvam0451 authored Dec 31, 2024
1 parent 5a23199 commit 0b0f680
Show file tree
Hide file tree
Showing 54 changed files with 809 additions and 558 deletions.
1 change: 1 addition & 0 deletions apps/mobile/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const expo = ({ config }: ConfigContext): ExpoConfig => ({
},
newArchEnabled: true,
plugins: [
'expo-sqlite',
[
'expo-build-properties',
{
Expand Down
32 changes: 23 additions & 9 deletions apps/mobile/app/(tabs)/notifications/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ import {
useAppAcct,
useAppTheme,
} from '../../../hooks/utility/global-state-extractors';
import { useEffect, useState } from 'react';
import { useEffect, useRef, useState } from 'react';
import AppNoAccount from '../../../components/error-screen/AppNoAccount';
import { APP_LANDING_PAGE_TYPE } from '../../../components/shared/topnavbar/AppTabLandingNavbar';
import { View } from 'react-native';
import MentionView from '../../../components/screens/notifications/landing/views/MentionView';
import ChatView from '../../../components/screens/notifications/landing/views/ChatView';
import SocialView from '../../../components/screens/notifications/landing/views/SocialView';
import UpdatesView from '../../../components/screens/notifications/landing/views/UpdatesView';
import { AppPagerView } from '../../../components/lib/AppPagerView';
import { BottomNavBar } from '../../../components/shared/pager-view/BottomNavBar';
import PagerView from 'react-native-pager-view';

const renderScene = (index: number) => {
switch (index) {
Expand All @@ -34,10 +34,17 @@ function Page() {
const { acct } = useAppAcct();
const [Index, setIndex] = useState<any>(0);

function onChipSelect(index: number) {
const ref = useRef<PagerView>(null);
const onChipSelect = (index: number) => {
if (Index !== index) {
setIndex(index);
ref.current.setPage(index);
}
};

function onPageScroll(e: any) {
const { offset, position } = e.nativeEvent;
const nextIdx = Math.round(position + offset);
setIndex(nextIdx);
}

useEffect(() => {
Expand Down Expand Up @@ -74,11 +81,18 @@ function Page() {
return (
<WithAppNotifSeenContext>
<View style={{ height: '100%', backgroundColor: theme.palette.bg }}>
<AppPagerView
pageCount={4}
renderFunction={renderScene}
onPageChangeCallback={onChipSelect}
/>
<PagerView
ref={ref}
scrollEnabled={true}
style={{ flex: 1 }}
initialPage={Index}
onPageScroll={onPageScroll}
>
{Array.from({ length: tabLabels.length }).map((_, index) => (
<View key={index}>{renderScene(index)}</View>
))}
</PagerView>

<BottomNavBar
Index={Index}
setIndex={onChipSelect}
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/(tabs)/profile/onboard/signin-bsky.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function SigninBsky() {
);

if (success) {
router.replace(APP_ROUTING_ENUM.PROFILE_ACCOUNTS);
router.replace(APP_ROUTING_ENUM.SETTINGS_TAB_ACCOUNTS);
} else {
console.log(reason);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import SelectAccountStack from '../../../components/screens/profile/stack/SelectAccount';
import SelectAccountStack from '../../../../components/screens/profile/stack/SelectAccount';

function AccountSelectionStack() {
return <SelectAccountStack />;
Expand Down
38 changes: 38 additions & 0 deletions apps/mobile/app/(tabs)/profile/settings/advanced.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { ScrollView, Text, StyleSheet } from 'react-native';
import useScrollMoreOnPageEnd from '../../../../states/useScrollMoreOnPageEnd';
import AppTopNavbar, {
APP_TOPBAR_TYPE_ENUM,
} from '../../../../components/shared/topnavbar/AppTopNavbar';
import { APP_FONTS } from '../../../../styles/AppFonts';
import { useAppTheme } from '../../../../hooks/utility/global-state-extractors';

function Page() {
const { translateY } = useScrollMoreOnPageEnd();
const { theme } = useAppTheme();

return (
<AppTopNavbar
type={APP_TOPBAR_TYPE_ENUM.GENERIC}
title={'Advanced Settings'}
translateY={translateY}
>
<ScrollView>
<Text style={[styles.text, { color: theme.secondary.a20 }]}>
More settings coming{' '}
<Text style={{ color: theme.complementary.a0 }}>soon™</Text>
</Text>
</ScrollView>
</AppTopNavbar>
);
}

export default Page;

const styles = StyleSheet.create({
text: {
fontFamily: APP_FONTS.INTER_600_SEMIBOLD,
marginTop: '50%',
fontSize: 18,
textAlign: 'center',
},
});
7 changes: 0 additions & 7 deletions apps/mobile/app/(tabs)/profile/settings/app-settings.tsx

This file was deleted.

38 changes: 38 additions & 0 deletions apps/mobile/app/(tabs)/profile/settings/general.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { ScrollView, Text, StyleSheet } from 'react-native';
import useScrollMoreOnPageEnd from '../../../../states/useScrollMoreOnPageEnd';
import AppTopNavbar, {
APP_TOPBAR_TYPE_ENUM,
} from '../../../../components/shared/topnavbar/AppTopNavbar';
import { APP_FONTS } from '../../../../styles/AppFonts';
import { useAppTheme } from '../../../../hooks/utility/global-state-extractors';

function Page() {
const { translateY } = useScrollMoreOnPageEnd();
const { theme } = useAppTheme();

return (
<AppTopNavbar
type={APP_TOPBAR_TYPE_ENUM.GENERIC}
title={'General Settings'}
translateY={translateY}
>
<ScrollView>
<Text style={[styles.text, { color: theme.secondary.a20 }]}>
More settings coming{' '}
<Text style={{ color: theme.complementary.a0 }}>soon™</Text>
</Text>
</ScrollView>
</AppTopNavbar>
);
}

export default Page;

const styles = StyleSheet.create({
text: {
fontFamily: APP_FONTS.INTER_600_SEMIBOLD,
marginTop: '50%',
fontSize: 18,
textAlign: 'center',
},
});
38 changes: 38 additions & 0 deletions apps/mobile/app/(tabs)/profile/settings/goodie-hut.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { ScrollView, Text, StyleSheet } from 'react-native';
import useScrollMoreOnPageEnd from '../../../../states/useScrollMoreOnPageEnd';
import AppTopNavbar, {
APP_TOPBAR_TYPE_ENUM,
} from '../../../../components/shared/topnavbar/AppTopNavbar';
import { APP_FONTS } from '../../../../styles/AppFonts';
import { useAppTheme } from '../../../../hooks/utility/global-state-extractors';

function Page() {
const { translateY } = useScrollMoreOnPageEnd();
const { theme } = useAppTheme();

return (
<AppTopNavbar
type={APP_TOPBAR_TYPE_ENUM.GENERIC}
title={'Goodie Hut'}
translateY={translateY}
>
<ScrollView>
<Text style={[styles.text, { color: theme.secondary.a20 }]}>
More settings coming{' '}
<Text style={{ color: theme.complementary.a0 }}>soon™</Text>
</Text>
</ScrollView>
</AppTopNavbar>
);
}

export default Page;

const styles = StyleSheet.create({
text: {
fontFamily: APP_FONTS.INTER_600_SEMIBOLD,
marginTop: '50%',
fontSize: 18,
textAlign: 'center',
},
});
115 changes: 0 additions & 115 deletions apps/mobile/app/(tabs)/profile/settings/help.tsx

This file was deleted.

45 changes: 0 additions & 45 deletions apps/mobile/app/(tabs)/profile/settings/info.tsx

This file was deleted.

Loading

0 comments on commit 0b0f680

Please sign in to comment.