mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 16:14:48 +01:00
News testing
This commit is contained in:
@@ -18,7 +18,6 @@ import { listen } from '@tauri-apps/api/event'
|
|||||||
import { dataDir } from '@tauri-apps/api/path'
|
import { dataDir } from '@tauri-apps/api/path'
|
||||||
import { appWindow } from '@tauri-apps/api/window'
|
import { appWindow } from '@tauri-apps/api/window'
|
||||||
import { unpatchGame } from '../utils/metadata'
|
import { unpatchGame } from '../utils/metadata'
|
||||||
import { showNews } from './components/news/NewsSection'
|
|
||||||
import DownloadHandler from '../utils/download'
|
import DownloadHandler from '../utils/download'
|
||||||
|
|
||||||
// Graphics
|
// Graphics
|
||||||
@@ -121,9 +120,6 @@ export class Main extends React.Component<IProps, IState> {
|
|||||||
isDownloading: this.props.downloadHandler.getDownloads().filter((d) => d.status !== 'finished')?.length > 0,
|
isDownloading: this.props.downloadHandler.getDownloads().filter((d) => d.status !== 'finished')?.length > 0,
|
||||||
})
|
})
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
// Summon the news when loaded since it will not show until click normally
|
|
||||||
showNews()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async openExtrasMenu(playGame: () => void) {
|
async openExtrasMenu(playGame: () => void) {
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ export default class NewsSection extends React.Component<IProps, IState> {
|
|||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
// Call showNews off the bat
|
// Call showNews off the bat
|
||||||
this.showNews()
|
this.showNews()
|
||||||
|
this.setSelected('commits')
|
||||||
}
|
}
|
||||||
|
|
||||||
setSelected(item: string) {
|
setSelected(item: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user